diff --git a/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab b/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab index 08ac981..9bd4496 100644 --- a/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab +++ b/Assets/SharedSpatialAnchors/Prefabs/Resources/GUI.prefab @@ -941,7 +941,7 @@ MonoBehaviour: observableSearch: 2 ObservedComponents: - {fileID: 4890728644967733183} - sceneViewId: 0 + sceneViewId: 8 InstantiationId: 0 isRuntimeInstantiated: 0 --- !u!114 &4890728644967733183 @@ -1249,7 +1249,7 @@ PrefabInstance: m_Modifications: - target: {fileID: -4586353448955332270, guid: 1837e416a7f023e4b9de7c449006ca42, type: 3} propertyPath: sceneViewId - value: 0 + value: 7 objectReference: {fileID: 0} - target: {fileID: -4586353448955332270, guid: 1837e416a7f023e4b9de7c449006ca42, type: 3} propertyPath: ObservedComponents.Array.size @@ -1468,20 +1468,20 @@ PrefabInstance: m_Modifications: - target: {fileID: -4740409285023748802, guid: ebcaad662ef2ae14ca92fbcd7a67ee56, type: 3} propertyPath: sceneViewId - value: 0 + value: 6 objectReference: {fileID: 0} - target: {fileID: -4740409285023748802, guid: ebcaad662ef2ae14ca92fbcd7a67ee56, type: 3} propertyPath: ObservedComponents.Array.size - value: 1 + value: 2 objectReference: {fileID: 0} - target: {fileID: -4740409285023748802, guid: ebcaad662ef2ae14ca92fbcd7a67ee56, type: 3} propertyPath: ObservedComponents.Array.data[0] value: - objectReference: {fileID: 4890728645620921254} + objectReference: {fileID: 1160440965950818012} - target: {fileID: -4740409285023748802, guid: ebcaad662ef2ae14ca92fbcd7a67ee56, type: 3} propertyPath: ObservedComponents.Array.data[1] value: - objectReference: {fileID: 0} + objectReference: {fileID: 4890728645620921254} - target: {fileID: 4293156748659161770, guid: ebcaad662ef2ae14ca92fbcd7a67ee56, type: 3} propertyPath: m_LocalPosition.y value: -132.3 diff --git a/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab b/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab index 84f4056..295b189 100644 --- a/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab +++ b/Assets/SharedSpatialAnchors/Prefabs/Resources/Wind_Turbine_withMap.prefab @@ -124,7 +124,7 @@ MonoBehaviour: ObservedComponents: - {fileID: 5762830989053361383} - {fileID: 5326010102002042226} - sceneViewId: 0 + sceneViewId: 4 InstantiationId: 0 isRuntimeInstantiated: 0 --- !u!114 &5762830989053361383 @@ -418,7 +418,7 @@ MonoBehaviour: - {fileID: 6433795997240961375} - {fileID: 7309076934599776581} - {fileID: 5643319099722428757} - sceneViewId: 0 + sceneViewId: 5 InstantiationId: 0 isRuntimeInstantiated: 0 --- !u!114 &6433795997240961375 @@ -507,7 +507,7 @@ PrefabInstance: m_Modifications: - target: {fileID: -9180565859901777493, guid: 8754aa5f3d45cec4980f02029a881f7d, type: 3} propertyPath: sceneViewId - value: 0 + value: 3 objectReference: {fileID: 0} - target: {fileID: -9180565859901777493, guid: 8754aa5f3d45cec4980f02029a881f7d, type: 3} propertyPath: Synchronization diff --git a/Assets/SharedSpatialAnchors/Scenes/SharedSpatialAnchors.unity b/Assets/SharedSpatialAnchors/Scenes/SharedSpatialAnchors.unity index c30486f..e594cad 100644 --- a/Assets/SharedSpatialAnchors/Scenes/SharedSpatialAnchors.unity +++ b/Assets/SharedSpatialAnchors/Scenes/SharedSpatialAnchors.unity @@ -155,6 +155,80 @@ Transform: m_Father: {fileID: 2982998299393685466} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &85093692 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 382264866490105690, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_Name + value: Wind_Turbine_withMap + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalPosition.x + value: 2.664 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 382264866490459002, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2369382148363411835, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: sceneViewId + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4423142984711990833, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: sceneViewId + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 5233951453890299482, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + propertyPath: sceneViewId + value: 3 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} +--- !u!1 &85093693 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 382264866490105690, guid: a4966b3be785a2e4aaf3eb0c3ec8db1f, type: 3} + m_PrefabInstance: {fileID: 85093692} + m_PrefabAsset: {fileID: 0} --- !u!4 &214795174 stripped Transform: m_CorrespondingSourceObject: {fileID: 5414912244175512725, guid: 60fa00281e83b294583adc31df520fbe, type: 3} @@ -688,6 +762,271 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 799752897} m_CullTransparentMesh: 1 +--- !u!1001 &868975863 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 515667115, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 515667115, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 515667115, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 515667115, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 515667115, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 515667115, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1172936521, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1172936521, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1172936521, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1172936521, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1172936521, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1172936521, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 254070869872014363, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: sceneViewId + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 1160440965950818012, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: windTurbineWithMap + value: + objectReference: {fileID: 85093693} + - target: {fileID: 1160440966322517371, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966322517371, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966322517371, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966322517371, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966322517371, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966322517371, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966516636514, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966516636514, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966516636514, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966516636514, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966516636514, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966516636514, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966591221005, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966591221005, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966591221005, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966591221005, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966591221005, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966591221005, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966832639534, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966832639534, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966832639534, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966832639534, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966832639534, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966832639534, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966914658193, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966914658193, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966914658193, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966914658193, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966914658193, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440966914658193, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440967716077673, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440967716077673, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440967716077673, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440967716077673, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440967716077673, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1160440967716077673, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733176, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_Name + value: GUI + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalPosition.x + value: -0.014 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalPosition.y + value: 0.080064446 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalPosition.z + value: 1.5369034 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733177, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4890728644967733180, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: sceneViewId + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 9073052392764595868, guid: f63dfc218827d724ca684921f9c50719, type: 3} + propertyPath: sceneViewId + value: 6 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f63dfc218827d724ca684921f9c50719, type: 3} --- !u!1 &869333010 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/SharedSpatialAnchors/Scripts/API.cs b/Assets/SharedSpatialAnchors/Scripts/API.cs index fe48ff2..927bd80 100644 --- a/Assets/SharedSpatialAnchors/Scripts/API.cs +++ b/Assets/SharedSpatialAnchors/Scripts/API.cs @@ -71,13 +71,38 @@ public class API : MonoBehaviourPunCallbacks, IPunObservable photonView.RPC("RPC_EmergencyButtonClick", RpcTarget.All); windTurbineWithMap = GameObject.FindGameObjectWithTag("Wind_Turbine_withMap"); - webSocketController = GameObject.FindGameObjectWithTag("WebController"); webSocketControllerScript = webSocketController.GetComponent<WebSocketController>(); - avatar = GameObject.FindGameObjectWithTag("Avatar"); audioControllerScript = avatar.GetComponent<AudioController>(); + if (windTurbineWithMap != null) + { + // Do something with myObject + Debug.Log("GameObject exists: " + windTurbineWithMap.name); + } + if (webSocketController != null) + { + // Do something with myObject + Debug.Log("GameObject exists: " + webSocketController.name); + } + if (webSocketControllerScript != null) + { + // Do something with myObject + Debug.Log("GameObject exists: " + webSocketControllerScript.name); + } + if (avatar != null) + { + // Do something with myObject + Debug.Log("GameObject exists: " + avatar.name); + } + if (audioControllerScript != null) + { + // Do something with myObject + Debug.Log("GameObject exists: " + audioControllerScript.name); + } + windTurbineController = windTurbineWithMap.transform.GetChild(0).gameObject; + windTurbineControllerScript = windTurbineController.GetComponent<Windturbine>(); } void Update() @@ -185,8 +210,7 @@ public void ExtractDataFromJson(string json) Debug.Log("Latest WS is - "+latestWS); } } - windTurbineController = windTurbineWithMap.transform.GetChild(0).gameObject; - windTurbineControllerScript = windTurbineController.GetComponent<Windturbine>(); + photonView = PhotonView.Get(this); photonView.RPC("RPC_GreenButtonClick", RpcTarget.All,windDirectionInDirectionTerms,LatestT+" C","Kista",latestWS+" m/s",true); } diff --git a/Assets/Wind_Turbine/Scripts/Windturbine.cs b/Assets/Wind_Turbine/Scripts/Windturbine.cs index 3b4e31b..8944e87 100644 --- a/Assets/Wind_Turbine/Scripts/Windturbine.cs +++ b/Assets/Wind_Turbine/Scripts/Windturbine.cs @@ -23,7 +23,16 @@ public class Windturbine : MonoBehaviour speed = Random.Range(75.0f, 86.0f); GUIdataGameObject = GameObject.FindGameObjectWithTag("GUIData"); apiScript = GUIdataGameObject.GetComponent<API>(); - + if (GUIdataGameObject != null) + { + // Do something with myObject + Debug.Log("GameObject exists: " + GUIdataGameObject.name); + } + if (apiScript != null) + { + // Do something with myObject + Debug.Log("GameObject exists: " + apiScript.name); + } //THis condition is to detach the map with the Wind turbine after Instantiating. This helps the map stick to the ground when the turbine rotates. GameObject.FindGameObjectWithTag("map").transform.SetParent(null); ; @@ -63,6 +72,7 @@ public class Windturbine : MonoBehaviour { Debug.Log("Rotate On it's Y-Axis"); endRotationY = apiScript.latestWD; + Debug.Log("endRotationY - Rotate On it's Y-Axis ----"+ endRotationY); StartCoroutine(RotateObject(startRotationY, endRotationY, 3.5f)); }