From 1657517d6e04ccb852af6c0a30f95f49aa30950e Mon Sep 17 00:00:00 2001 From: mklewandowski Date: Thu, 26 Aug 2021 09:03:38 -0500 Subject: [PATCH 1/2] Removed unused star content from info panel --- Assets/Prefabs/UI/InformationPanel.prefab | 351 +--------------------- Assets/Scripts/UI/InfoPanelController.cs | 109 ------- 2 files changed, 4 insertions(+), 456 deletions(-) diff --git a/Assets/Prefabs/UI/InformationPanel.prefab b/Assets/Prefabs/UI/InformationPanel.prefab index 209aff18..0b8acbdb 100644 --- a/Assets/Prefabs/UI/InformationPanel.prefab +++ b/Assets/Prefabs/UI/InformationPanel.prefab @@ -8104,161 +8104,6 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &909990070542231239 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5655777865651661685} - - component: {fileID: 7626993288878782349} - - component: {fileID: 284868150843679561} - - component: {fileID: 7469403373501883095} - m_Layer: 5 - m_Name: ConstellationDetailsText - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &5655777865651661685 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 909990070542231239} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 5517825201560857807} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -120, y: 0} - m_SizeDelta: {x: 230, y: 70} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7626993288878782349 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 909990070542231239} - m_CullTransparentMesh: 0 ---- !u!114 &284868150843679561 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 909990070542231239} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: 'Star name - - Constellation - - Alt/Az, Mag - - RA Dec Dist' - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 14 - m_fontSizeBase: 14 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 1 - m_VerticalAlignment: 256 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 1 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 1 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!114 &7469403373501883095 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 909990070542231239} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5cc2b214052b53345a385d0db6003fca, type: 3} - m_Name: - m_EditorClassIdentifier: - buttonText: {fileID: 284868150843679561} - initialText: - changeText: --- !u!1 &945728160505702806 GameObject: m_ObjectHideFlags: 0 @@ -19240,80 +19085,6 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &2359314110135865856 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8431819806965919407} - - component: {fileID: 3144736506952070020} - - component: {fileID: 5972608458628369033} - m_Layer: 5 - m_Name: Image - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &8431819806965919407 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2359314110135865856} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 5517825201560857807} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 35, y: 0} - m_SizeDelta: {x: 40, y: 40} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &3144736506952070020 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2359314110135865856} - m_CullTransparentMesh: 0 ---- !u!114 &5972608458628369033 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2359314110135865856} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 6021c776447a14875803fb8d305e757f, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 --- !u!1 &2385266159326606296 GameObject: m_ObjectHideFlags: 0 @@ -29649,7 +29420,6 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 5517825201560857807} - {fileID: 4639036797952013413} - {fileID: 8943555143346769930} - {fileID: 7153131411061038901} @@ -29676,7 +29446,6 @@ MonoBehaviour: m_EditorClassIdentifier: locationDetailsText: {fileID: 8184810142431726300} dateTimeDetailsText: {fileID: 683186044991421928} - constellationText: {fileID: 909990070542231239} networkUserList: {fileID: 1787982297224413076} networkUserPrefab: {fileID: 7577592127271943077, guid: 1060ad0539984411388171fa274364c1, type: 3} @@ -42017,7 +41786,7 @@ RectTransform: - {fileID: 8956625683707847539} - {fileID: 2808253860466090704} m_Father: {fileID: 3728735833352645217} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} @@ -50041,7 +49810,7 @@ RectTransform: - {fileID: 8642809400163989766} - {fileID: 3800965616885124672} m_Father: {fileID: 3728735833352645217} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -50864,80 +50633,6 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &6373411103571269224 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 194151999899889199} - - component: {fileID: 7301433483494945046} - - component: {fileID: 3666676359549119374} - m_Layer: 5 - m_Name: Background2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &194151999899889199 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6373411103571269224} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 5517825201560857807} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 150, y: -40} - m_SizeDelta: {x: 300, y: 80} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7301433483494945046 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6373411103571269224} - m_CullTransparentMesh: 0 ---- !u!114 &3666676359549119374 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6373411103571269224} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.11764706, g: 0.2627451, b: 0.38679248, a: 0.7882353} - m_RaycastTarget: 0 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 --- !u!1 &6375141051924505241 GameObject: m_ObjectHideFlags: 0 @@ -54072,7 +53767,7 @@ RectTransform: - {fileID: 5543134854745488826} - {fileID: 1914793175039152294} m_Father: {fileID: 3728735833352645217} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -56986,7 +56681,7 @@ RectTransform: - {fileID: 326231810073530991} - {fileID: 4231444643831628172} m_Father: {fileID: 3728735833352645217} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -59401,44 +59096,6 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &7422601987669302616 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5517825201560857807} - m_Layer: 5 - m_Name: ConstellationDetails - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &5517825201560857807 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7422601987669302616} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 194151999899889199} - - {fileID: 8431819806965919407} - - {fileID: 5655777865651661685} - m_Father: {fileID: 3728735833352645217} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 150, y: -40} - m_SizeDelta: {x: 300, y: 80} - m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7426037462141238627 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/UI/InfoPanelController.cs b/Assets/Scripts/UI/InfoPanelController.cs index efcb0cec..075c2da0 100644 --- a/Assets/Scripts/UI/InfoPanelController.cs +++ b/Assets/Scripts/UI/InfoPanelController.cs @@ -4,8 +4,6 @@ using TMPro; using UnityEngine; using System.Text; -using SunCalcNet; - using UnityEngine.UI; public class InfoPanelController : MonoBehaviour { @@ -14,21 +12,11 @@ public class InfoPanelController : MonoBehaviour public GameObject locationDetailsText; public GameObject dateTimeDetailsText; - public GameObject constellationText; public GameObject networkUserList; public GameObject networkUserPrefab; public GameObject networkStatusText; public GameObject networkGroupText; - private enum TextDisplayObject { - None, - Sun, - Moon, - Star - } - TextDisplayObject textDisplayObject = TextDisplayObject.None; - Star currentStarData; - public TextMeshProUGUI debugText; private string lastDebugMessage = ""; @@ -43,13 +31,9 @@ private void Start() Debug.Log("wiring up event listeners "); Debug.Log(events.PushPinSelected.GetPersistentEventCount()); events.PushPinSelected.AddListener(updatePushpinText); - events.StarSelected.AddListener(starSelectedText); - events.SunSelected.AddListener(sunSelectedText); - events.MoonSelected.AddListener(moonSelectedText); events.PlayerJoined.AddListener(playerListChanged); events.PlayerLeft.AddListener(playerListChanged); events.NetworkConnection.AddListener(connectionStatusUpdated); - events.SimulationTimeChanged.AddListener(simulationTimeChanged); playerListChanged(manager.LocalUsername); updatePushpinText(manager.LocalPlayerPin); } @@ -73,91 +57,6 @@ private void updatePushpinText(Pushpin pin) StringBuilder locationDetails = new StringBuilder(); locationDetails.Append(manager.CurrentLocationDisplayName); locationDetailsText.GetComponent().SetText(locationDetails.ToString()); - updateSelectSunOrMoonText(); - } - - private void starSelectedText(Star starData, string playerName, Color playerColor) - { - StringBuilder description = new StringBuilder(); - if (starData == null) - { - description.Append("Now showing constellation: "); - description.Append(manager.CurrentlySelectedConstellation); - constellationText.GetComponent().SetText(description.ToString()); - } - else - { - double longitudeTimeOffset = manager.CurrentLatLng.Longitude/15d; - double lst = manager.CurrentSimulationTime.ToSiderealTime() + longitudeTimeOffset; - AltAz altAz = Utils.CalculateAltitudeAzimuthForStar(starData.RA, starData.Dec, - lst, manager.CurrentLatLng.Latitude); - description.Append("Name: ").AppendLine(starData.ProperName.Length > 0 ? starData.ProperName : "N/A"); - description.Append("Constellation: ").AppendLine(starData.ConstellationFullName.Length > 0 ? starData.ConstellationFullName : "N/A"); - description.Append("Alt/Az: ") - .Append(altAz.Altitude.ToString("F2")) - .Append(", ") - .Append(altAz.Azimuth.ToString("F2")) - .Append(" Mag: ") - .AppendLine(starData.Mag.ToString()); - description.Append("R.A.: ") - .Append(starData.RA.ToString("F2")) - .Append(" Dec: ") - .Append(starData.Dec.ToString("F2")) - // A value of 10000000 indicates missing or dubious (e.g., negative) parallax data in Hipparcos - .Append(starData.Dist != 10000000 ? " Dist: " + (starData.Dist * 3.262f).ToString("F0") + " ly": ""); - constellationText.GetComponent().SetText(description.ToString()); - } - textDisplayObject = TextDisplayObject.Star; - currentStarData = starData; - } - - private void sunSelectedText(bool selected) - { - var solarPosition = SunCalc.GetSunPosition(manager.CurrentSimulationTime, manager.CurrentLatLng.Latitude, manager.CurrentLatLng.Longitude); - double azimuth = 180f + (solarPosition.Azimuth * 180f / Mathf.PI); - double altitude = solarPosition.Altitude * 180f / Mathf.PI; - StringBuilder description = new StringBuilder(); - description.AppendLine("The Sun"); - description.Append("Alt/Az: ") - .Append(altitude.ToString("F2")) - .Append(", ") - .AppendLine(azimuth.ToString("F2")); - constellationText.GetComponent().SetText(description.ToString()); - textDisplayObject = TextDisplayObject.Sun; - } - - private void moonSelectedText(bool selected) - { - var lunarPosition = MoonCalc.GetMoonPosition(manager.CurrentSimulationTime, manager.CurrentLatLng.Latitude, manager.CurrentLatLng.Longitude); - double azimuth = 180f + (lunarPosition.Azimuth * 180f / Mathf.PI); - double altitude = lunarPosition.Altitude * 180f / Mathf.PI; - StringBuilder description = new StringBuilder(); - description.AppendLine("The Moon"); - description.Append("Alt/Az: ") - .Append(altitude.ToString("F2")) - .Append(", ") - .AppendLine(azimuth.ToString("F2")); - constellationText.GetComponent().SetText(description.ToString()); - textDisplayObject = TextDisplayObject.Moon; - } - - private void simulationTimeChanged() { - updateSelectSunOrMoonText(); - } - - private void updateSelectSunOrMoonText() { - if (textDisplayObject == TextDisplayObject.Sun) - { - sunSelectedText(true); - } - else if (textDisplayObject == TextDisplayObject.Moon) - { - moonSelectedText(true); - } - else if (textDisplayObject == TextDisplayObject.Star) - { - starSelectedText(currentStarData, manager.LocalUsername, manager.LocalPlayerColor); - } } private void connectionStatusUpdated(bool isConnected) @@ -249,17 +148,9 @@ private void removeAllListeners() { Debug.Log("removing listeners "); events.PushPinSelected.RemoveListener(updatePushpinText); - events.StarSelected.RemoveListener(starSelectedText); - events.SunSelected.RemoveListener(sunSelectedText); - events.MoonSelected.RemoveListener(moonSelectedText); events.PlayerJoined.RemoveListener(playerListChanged); events.PlayerLeft.RemoveListener(playerListChanged); events.NetworkConnection.RemoveListener(connectionStatusUpdated); - events.SimulationTimeChanged.RemoveListener(simulationTimeChanged); - } - private void OnDisable() - { - // removeAllListeners(); } private void OnDestroy() From 25b4bfc9a565303752ee355005cb550edc971b4a Mon Sep 17 00:00:00 2001 From: mklewandowski Date: Thu, 26 Aug 2021 09:24:16 -0500 Subject: [PATCH 2/2] Fix raycast typo --- Assets/Scripts/InteractionDetect.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/InteractionDetect.cs b/Assets/Scripts/InteractionDetect.cs index 985ad20f..ba52c931 100644 --- a/Assets/Scripts/InteractionDetect.cs +++ b/Assets/Scripts/InteractionDetect.cs @@ -114,8 +114,8 @@ public static bool IsPointerOverUIElement(List eventSystemRaycast { for (int index = 0; index < eventSystemRaycastResults.Count; index ++) { - RaycastResult curRaysastResult = eventSystemRaycastResults [index]; - if (curRaysastResult.gameObject.layer == LayerMask.NameToLayer("UI")) + RaycastResult curRaycastResult = eventSystemRaycastResults [index]; + if (curRaycastResult.gameObject.layer == LayerMask.NameToLayer("UI")) return true; } return false;