diff --git a/ReViVD/Assets/ControlPanel/ControlPanel.cs b/ReViVD/Assets/ControlPanel/ControlPanel.cs index 2f5f34d..a65a61c 100644 --- a/ReViVD/Assets/ControlPanel/ControlPanel.cs +++ b/ReViVD/Assets/ControlPanel/ControlPanel.cs @@ -540,6 +540,9 @@ void LoadViz() { Visualization.Instance.Load(); + spheres.animate.interactable = spheres.display.isOn; + spheres.drop.interactable = spheres.display.isOn; + export_results.interactable = true; } @@ -547,6 +550,11 @@ void LoadViz() { void UnloadViz() { Visualization.Instance.Unload(); + spheres.animate.isOn = false; + Visualization.Instance.doTimeSphereAnimation = false; + spheres.animate.interactable = false; + spheres.drop.interactable = false; + export_results.interactable = false; } diff --git a/ReViVD/Assets/Scenes/Scene.unity b/ReViVD/Assets/Scenes/Scene.unity index 6cffb82..4287f9c 100644 --- a/ReViVD/Assets/Scenes/Scene.unity +++ b/ReViVD/Assets/Scenes/Scene.unity @@ -16977,7 +16977,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0.0000012516975, y: 16.999994} + m_AnchoredPosition: {x: 0.0000012516975, y: 16.999992} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &1465808815 @@ -19296,7 +19296,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1625316222 RectTransform: m_ObjectHideFlags: 0 @@ -19319,9 +19319,9 @@ RectTransform: m_Father: {fileID: 1465808814} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 325, y: -165} m_SizeDelta: {x: 650, y: 140} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1625316223 diff --git a/ReViVD/Assets/Visualization/Visualization.cs b/ReViVD/Assets/Visualization/Visualization.cs index b397fff..edfa222 100644 --- a/ReViVD/Assets/Visualization/Visualization.cs +++ b/ReViVD/Assets/Visualization/Visualization.cs @@ -84,9 +84,6 @@ public void Unload() { districts.Clear(); clearDistrictsToHighlight = true; - useGlobalTime = false; - doTimeSphereAnimation = false; - _loaded = false; } @@ -323,6 +320,8 @@ void Update() { old_traceTimeSpheres = true; } + Debug.Log("anim: " + doTimeSphereAnimation + "; gtime: " + useGlobalTime + ", " + globalTime); + if (useGlobalTime && doTimeSphereAnimation) { globalTime += timeSphereAnimationSpeed * Time.deltaTime; ControlPanel.Instance.spheres.globalTime.text = globalTime.ToString();