Vector3 calculateDistance(Matrix4x4 point) { Vector3 pointPosition = UnityARMatrixOps.GetPosition(point); Matrix4x4 camera = UnityARSessionNativeInterface.GetARSessionNativeInterface().GetCameraPose(); Vector3 cameraPosition = UnityARMatrixOps.GetPosition(camera); ScreenDebug.DebugToScreen("" + (pointPosition - cameraPosition)); return(pointPosition - cameraPosition); }
// [UnityTest] public IEnumerator PauseScreen_Can_Log_Debug_Info() { PauseScreen.PauseGame(); yield return(null); UnityEngine.UI.Toggle toggle = TestUtils.Find <UnityEngine.UI.Toggle>("display_logs_toggle"); toggle.isOn = true; yield return(null); ScreenDebug debug = GameManager.Instance.GetComponentInChildren <ScreenDebug>(true); Assert.True(debug.enabled); toggle.isOn = false; yield return(null); Assert.False(debug.enabled); PauseScreen.ContinueGame(); }
void Start() { screenDebug = GetComponent<ScreenDebug> (); }