Fix for MapPinExample scene not loading on HL2.

Includes update to Unity 2019.4.29f1.
This commit is contained in:
Brian Kircher 2021-08-11 14:25:54 -07:00
Родитель 3686a9d6cb
Коммит b430726c41
11 изменённых файлов: 95 добавлений и 161 удалений

Просмотреть файл

@ -911,41 +911,6 @@ PrefabInstance:
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.x
value: -1.733
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.663
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.7
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x

Просмотреть файл

@ -619,7 +619,7 @@ MonoBehaviour:
mainLabelText: {fileID: 314749196454160876}
interactable: {fileID: 7141932979789059775}
seeItSayItLabel: {fileID: 0}
seeItSatItLabelText: {fileID: 0}
seeItSayItLabelText: {fileID: 0}
iconStyle: 0
iconCharLabel: {fileID: 4878122500438904353}
iconCharFont: {fileID: 0}
@ -846,6 +846,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_renderer: {fileID: 314749196454160787}
m_maskType: 0
_SortingLayer: 0
_SortingLayerID: 0
_SortingOrder: 0
--- !u!1 &673986884964387255
@ -1024,8 +1025,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2113668622888729042}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.733, y: 0.663, z: 0.7}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
m_Children:
- {fileID: 314749195312561917}
- {fileID: 6674724643049027341}
@ -1070,7 +1071,7 @@ MonoBehaviour:
moveLerpTime: 0.5
rotateLerpTime: 0.5
scaleLerpTime: 0
maintainScale: 1
maintainScaleOnInitialization: 1
smoothing: 1
lifetime: 0
referenceDirection: 1
@ -1101,6 +1102,9 @@ MonoBehaviour:
autoFollowAtDistance: 0
autoFollowDistance: 2
autoFollowTransformTarget: {fileID: 0}
autoFollowTriggered:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2230018967426486585
GameObject:
m_ObjectHideFlags: 0
@ -1362,6 +1366,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_renderer: {fileID: 963070143330438492}
m_maskType: 0
_SortingLayer: 0
_SortingLayerID: 0
_SortingOrder: 0
--- !u!1 &2556693979868098857
@ -2294,6 +2299,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_renderer: {fileID: 8538324613138072240}
m_maskType: 0
_SortingLayer: 0
_SortingLayerID: 0
_SortingOrder: 0
--- !u!1 &7516958955887725506
@ -2782,6 +2788,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_renderer: {fileID: 8494851947237655382}
m_maskType: 0
_SortingLayer: 0
_SortingLayerID: 0
_SortingOrder: 0
--- !u!1 &8494851947598634635
@ -3131,6 +3138,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_renderer: {fileID: 8494851947910446166}
m_maskType: 0
_SortingLayer: 0
_SortingLayerID: 0
_SortingOrder: 0
--- !u!1 &8494851948187920212
@ -3150,7 +3158,7 @@ GameObject:
- component: {fileID: 8494851948187920201}
- component: {fileID: 8494851948187920202}
m_Layer: 0
m_Name: ResizeButton
m_Name: ResizeMapButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -3643,7 +3651,7 @@ MonoBehaviour:
mainLabelText: {fileID: 8494851947910446160}
interactable: {fileID: 8494851948187920207}
seeItSayItLabel: {fileID: 0}
seeItSatItLabelText: {fileID: 0}
seeItSayItLabelText: {fileID: 0}
iconStyle: 0
iconCharLabel: {fileID: 8494851947237655377}
iconCharFont: {fileID: 0}
@ -4248,7 +4256,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Reposition Map
m_text: Place Map
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2}
m_sharedMaterial: {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce,
@ -4318,6 +4326,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_renderer: {fileID: 9186654360402290303}
m_maskType: 0
_SortingLayer: 0
_SortingLayerID: 0
_SortingOrder: 0
--- !u!1 &9186654360522611853
@ -4367,7 +4376,7 @@ GameObject:
- component: {fileID: 7151776717540749144}
- component: {fileID: 1535509169727626697}
m_Layer: 0
m_Name: RepositionButton
m_Name: PlaceMapButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -4860,7 +4869,7 @@ MonoBehaviour:
mainLabelText: {fileID: 9186654360402290176}
interactable: {fileID: 1746981016940468563}
seeItSayItLabel: {fileID: 0}
seeItSatItLabelText: {fileID: 0}
seeItSayItLabelText: {fileID: 0}
iconStyle: 0
iconCharLabel: {fileID: 4076084628504396237}
iconCharFont: {fileID: 0}

Просмотреть файл

@ -835,41 +835,6 @@ PrefabInstance:
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.x
value: -1.733
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.663
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.7
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x

Просмотреть файл

@ -275,41 +275,6 @@ PrefabInstance:
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.x
value: -1.733
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.663
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.7
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3445010261997386319, guid: b6a2476254bd12a4795e1eb8dd07936f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -969,7 +934,18 @@ MonoBehaviour:
debugEnabled: 1
onPlacingStarted:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1276686188}
m_MethodName: set_enabled
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
onPlacingStopped:
m_PersistentCalls:
m_Calls:

Просмотреть файл

@ -48,13 +48,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_location:
Latitude: 0
Longitude: 0
_latitude: 0
_longitude: 0
_altitude: 0
_altitudeReference: 2
IsLayerSynchronized: 1
UseRealWorldScale: 0
ScaleCurve:
_isLayerSynchronized: 1
_useRealWorldScale: 0
_scaleCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
@ -78,6 +78,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_showOutsideMapBounds: 0
--- !u!114 &114896553018143308
MonoBehaviour:
m_ObjectHideFlags: 0
@ -227,7 +228,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Test
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@ -248,13 +249,12 @@ MonoBehaviour:
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 1.15
m_fontSizeBase: 1.5
m_fontWeight: 400
@ -262,6 +262,8 @@ MonoBehaviour:
m_fontSizeMin: 0
m_fontSizeMax: 100
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 514
m_characterSpacing: 0
m_wordSpacing: 0
@ -272,10 +274,8 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
@ -283,42 +283,23 @@ MonoBehaviour:
m_parseCtrlCharacters: 1
m_isOrthographic: 0
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 114428088395238446}
characterCount: 4
spriteCount: 0
spaceCount: 0
wordCount: 1
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_renderer: {fileID: 23896439908386428}
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_maskType: 0
_SortingLayer: 0
_SortingLayerID: 0
_SortingOrder: 0
--- !u!1 &1632364928461936
GameObject:
m_ObjectHideFlags: 0

Просмотреть файл

@ -4,6 +4,8 @@
using Microsoft.Geospatial;
using Microsoft.Maps.Unity;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using TMPro;
using UnityEngine;
@ -28,11 +30,23 @@ public class MapPinProvider : MonoBehaviour
Debug.Assert(_mapPinPrefab != null);
Debug.Assert(_mapPinLocationsCsv != null);
var lines = _mapPinLocationsCsv.text.Split(new [] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
StartCoroutine(LoadMapPinsFromCsv());
}
IEnumerator LoadMapPinsFromCsv()
{
var startTime = Time.realtimeSinceStartup;
var frameStartTime = startTime;
var lines = _mapPinLocationsCsv.text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
_mapPinPrefab.gameObject.SetActive(false);
Debug.Log($"Creating MapPins ({lines.Length}) from {_mapPinLocationsCsv.name}...");
// Generate a MapPin for each of the locations and add it to the layer.
var numCreated = 0;
var mapPinsCreatedThisFrame = new List<MapPin>(lines.Length);
foreach (var csvLine in lines)
{
var csvEntries = csvLine.Split(',');
@ -42,9 +56,29 @@ public class MapPinProvider : MonoBehaviour
new LatLon(
double.Parse(csvEntries[0], NumberStyles.Number, CultureInfo.InvariantCulture),
double.Parse(csvEntries[1], NumberStyles.Number, CultureInfo.InvariantCulture));
_mapPinLayer.MapPins.Add(mapPin);
mapPin.GetComponentInChildren<TextMeshPro>().text = csvEntries[2].ToLower() == "null" ? "" : csvEntries[2];
mapPinsCreatedThisFrame.Add(mapPin);
// yield occasionally to not block rendering.
if (Time.realtimeSinceStartup - frameStartTime > 0.015f)
{
numCreated += mapPinsCreatedThisFrame.Count;
_mapPinLayer.MapPins.AddRange(mapPinsCreatedThisFrame);
mapPinsCreatedThisFrame.Clear();
Debug.Log($"{numCreated}/{lines.Length} MapPins created.");
yield return null;
frameStartTime = Time.realtimeSinceStartup;
}
}
_mapPinLayer.MapPins.AddRange(mapPinsCreatedThisFrame);
mapPinsCreatedThisFrame.Clear();
Debug.Log($"MapPin creation complete. ({Time.realtimeSinceStartup - startTime:F2}s)");
}
}

Просмотреть файл

@ -26,5 +26,7 @@ MonoBehaviour:
keys: []
values: []
stringPreferences:
keys: []
values: []
keys:
- BuildDeployWindow_AppLauncherModelLocation
values:
-

Просмотреть файл

@ -26,15 +26,15 @@
"com.unity.ide.rider": "1.2.1",
"com.unity.ide.vscode": "1.2.3",
"com.unity.multiplayer-hlapi": "1.0.8",
"com.unity.test-framework": "1.1.24",
"com.unity.test-framework": "1.1.27",
"com.unity.textmeshpro": "2.1.6",
"com.unity.timeline": "1.2.18",
"com.unity.ugui": "1.0.0",
"com.unity.xr.arcore": "2.1.18",
"com.unity.xr.arfoundation": "2.1.18",
"com.unity.xr.arkit": "2.1.18",
"com.unity.xr.legacyinputhelpers": "2.1.7",
"com.unity.xr.management": "4.0.5",
"com.unity.xr.legacyinputhelpers": "2.1.8",
"com.unity.xr.management": "4.0.7",
"com.unity.xr.openvr.standalone": "2.0.5",
"com.unity.xr.windowsmr.metro": "4.2.3",
"com.unity.modules.ai": "1.0.0",

Просмотреть файл

@ -38,7 +38,6 @@ GraphicsSettings:
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}

Просмотреть файл

@ -673,6 +673,7 @@ PlayerSettings:
ps4videoRecordingFeaturesUsed: 0
ps4contentSearchFeaturesUsed: 0
ps4CompatibilityPS5: 0
ps4AllowPS5Detection: 0
ps4GPU800MHz: 1
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []
@ -744,6 +745,7 @@ PlayerSettings:
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
suppressCommonWarnings: 1
allowUnsafeCode: 0
additionalIl2CppArgs:
scriptingRuntimeVersion: 1
@ -752,6 +754,7 @@ PlayerSettings:
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform:
Android: 6
Windows Store Apps: 6
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: MapsSdkSamples

Просмотреть файл

@ -1,2 +1,2 @@
m_EditorVersion: 2019.4.27f1
m_EditorVersionWithRevision: 2019.4.27f1 (23dc10685eb4)
m_EditorVersion: 2019.4.29f1
m_EditorVersionWithRevision: 2019.4.29f1 (0eeae20b1d82)