|
@@ -1,3 +1,4 @@
|
|
|
+using SC.XR.Unity;
|
|
|
using UnityEngine;
|
|
|
using UnityEngine.UI;
|
|
|
|
|
@@ -7,10 +8,12 @@ public class SavePanel : AbstractController
|
|
|
public Button cancleBtn;
|
|
|
public Transform meshTest;
|
|
|
public Transform parent;
|
|
|
+ public SCToggleSwitch3D sCToggleSwitch3D;
|
|
|
private void Start()
|
|
|
{
|
|
|
meshTest = GameObject.Find("ARSpaceForAll/mesh_test").gameObject.transform;
|
|
|
parent = GameObject.Find("ARSpaceForAll").transform;
|
|
|
+ sCToggleSwitch3D = transform.parent.GetComponent<SCToggleSwitch3D>();
|
|
|
saveBtn.onClick.AddListener(Save);
|
|
|
cancleBtn.onClick.AddListener(Cancle);
|
|
|
}
|
|
@@ -21,6 +24,7 @@ public class SavePanel : AbstractController
|
|
|
PlayerPrefs.SetFloat("meshTest_PosZ", meshTest.localPosition.z);
|
|
|
PlayerPrefs.SetFloat("meshTest_RotY", meshTest.localEulerAngles.y);
|
|
|
|
|
|
+ sCToggleSwitch3D.isOn = false;
|
|
|
gameObject.SetActive(false);
|
|
|
}
|
|
|
|
|
@@ -35,6 +39,7 @@ public class SavePanel : AbstractController
|
|
|
float rotY = PlayerPrefs.GetFloat("meshTest_RotY");
|
|
|
meshTest.localEulerAngles = new Vector3(0, rotY, 0);
|
|
|
|
|
|
+ sCToggleSwitch3D.isOn = false;
|
|
|
gameObject.SetActive(false);
|
|
|
}
|
|
|
|