diff --git a/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Anchor.prefab b/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Anchor.prefab index f90594e0a..ff9968249 100644 --- a/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Anchor.prefab +++ b/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Anchor.prefab @@ -313,9 +313,107 @@ Transform: - {fileID: 4209237128822544} - {fileID: 4011343239704628} - {fileID: 4919992784813117573} + - {fileID: 6482351537223522476} m_Father: {fileID: 4940852310305428} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3875249028393035889 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6482351537223522476} + - component: {fileID: 4978372573031865161} + - component: {fileID: 8150403970241430669} + - component: {fileID: 2166564959296956673} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6482351537223522476 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3875249028393035889} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.75, y: 0.75, z: 0.75} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5592926836742763379} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4978372573031865161 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3875249028393035889} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &8150403970241430669 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3875249028393035889} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &2166564959296956673 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3875249028393035889} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} --- !u!1 &9089492096723985690 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Feathered Plane.prefab b/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Feathered Plane.prefab index 8142b3b05..ca49b64fc 100644 --- a/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Feathered Plane.prefab +++ b/Assets/MirageXR/Common/Resources/AR/Prefabs/AR Feathered Plane.prefab @@ -168,5 +168,4 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _colorDefault: {r: 1, g: 1, b: 1, a: 0.7} - _colorFloor: {r: 0.44, g: 0.22, b: 0.04, a: 0.7} - _isDebugPlane: 0 + _colorFloor: {r: 0.61130565, g: 0.9056604, b: 0.55108577, a: 0.7} diff --git a/Assets/MirageXR/Common/Resources/AR/Prefabs/DebugPlane.prefab b/Assets/MirageXR/Common/Resources/AR/Prefabs/DebugPlane.prefab index 3c202bd33..54230df0c 100644 --- a/Assets/MirageXR/Common/Resources/AR/Prefabs/DebugPlane.prefab +++ b/Assets/MirageXR/Common/Resources/AR/Prefabs/DebugPlane.prefab @@ -124,4 +124,4 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _colorDefault: {r: 1, g: 1, b: 1, a: 0.7} - _colorFloor: {r: 0.03, g: 1, b: 0.09, a: 0.7} + _colorFloor: {r: 0.49049792, g: 1, b: 0.4198113, a: 0.7490196} diff --git a/Assets/MirageXR/Common/Scenes/Start.unity b/Assets/MirageXR/Common/Scenes/Start.unity index 57711f4fe..aec0dbc27 100644 --- a/Assets/MirageXR/Common/Scenes/Start.unity +++ b/Assets/MirageXR/Common/Scenes/Start.unity @@ -156,7 +156,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 10 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &502 MonoBehaviour: @@ -308,7 +308,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &92586981 MonoBehaviour: @@ -369,7 +369,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &383528544 GameObject: @@ -456,7 +456,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 8 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &517222969 MonoBehaviour: @@ -488,6 +488,8 @@ MonoBehaviour: position: rotation: scale: 0 + positionLock: 0 + billboarded: 1 duration: 0 guide: 0 _helpSelectionPopup: {fileID: 5322029663912086542, guid: ce6c1efdd8b1ca34aab20e8018664f11, @@ -543,18 +545,8 @@ MonoBehaviour: _forceManagerType: 0 _prefabARFoundationAnchor: {fileID: 1362899771367802, guid: 3403fa35f0b1e1d47932c98fae4c8789, type: 3} - _prefabARFoundationPlane: {fileID: 1585201990951412, guid: 0d9e1f0e794928f49aee189d66f1e4a6, - type: 3} _prefabEditorAnchor: {fileID: 1362899771367802, guid: 3403fa35f0b1e1d47932c98fae4c8789, type: 3} - _prefabEditorPlane: {fileID: 4068327573183295800, guid: 9540ea72376a449458b8522ecc456196, - type: 3} - _onDetectionEnabled: - m_PersistentCalls: - m_Calls: [] - _onDetectionDisabled: - m_PersistentCalls: - m_Calls: [] --- !u!4 &636839176 stripped Transform: m_CorrespondingSourceObject: {fileID: 6061520891645277162, guid: b20febc21a242b143aa20ea181ba5e8e, @@ -603,7 +595,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 11 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &802172366 GameObject: @@ -635,7 +627,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &802172368 MonoBehaviour: @@ -1008,7 +1000,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1139113737 MonoBehaviour: @@ -1109,7 +1101,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1888399833} - m_RootOrder: 9 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1263153153 MonoBehaviour: @@ -1249,6 +1241,7 @@ MonoBehaviour: _imageTargetManager: {fileID: 383528546} _calibrationManager: {fileID: 1209410220} _floorManager: {fileID: 547987041} + _planeManager: {fileID: 1942155610} _pointCloudManager: {fileID: 1139113737} _brandManager: {fileID: 802172368} _gridManager: {fileID: 141412590} @@ -1267,6 +1260,7 @@ Transform: - {fileID: 383528545} - {fileID: 1209410221} - {fileID: 547987040} + - {fileID: 1942155609} - {fileID: 1139113736} - {fileID: 141412591} - {fileID: 1980728072} @@ -1301,7 +1295,7 @@ PrefabInstance: - target: {fileID: 7085513642986947666, guid: 6913f3715d997c84e8d04d5e256fc233, type: 3} propertyPath: m_RootOrder - value: 12 + value: 13 objectReference: {fileID: 0} - target: {fileID: 7085513642986947666, guid: 6913f3715d997c84e8d04d5e256fc233, type: 3} @@ -1361,6 +1355,61 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1901844725} m_PrefabAsset: {fileID: 0} +--- !u!1 &1942155608 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1942155609} + - component: {fileID: 1942155610} + m_Layer: 0 + m_Name: PlaneManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1942155609 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1942155608} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1888399833} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1942155610 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1942155608} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 64ef31f9a2613894d8d6b9efcfdaa9bf, type: 3} + m_Name: + m_EditorClassIdentifier: + _forceManagerType: 0 + _prefabARFoundationPlane: {fileID: 1585201990951412, guid: 0d9e1f0e794928f49aee189d66f1e4a6, + type: 3} + _prefabEditorPlane: {fileID: 4068327573183295800, guid: 9540ea72376a449458b8522ecc456196, + type: 3} + _onDetectionEnabled: + m_PersistentCalls: + m_Calls: [] + _onDetectionDisabled: + m_PersistentCalls: + m_Calls: [] --- !u!4 &1980728072 stripped Transform: m_CorrespondingSourceObject: {fileID: 8856608566303270418, guid: 380bb3c2508c4473aec1d2fcb48cce6f, @@ -1446,7 +1495,7 @@ PrefabInstance: - target: {fileID: 8856608566303270418, guid: 380bb3c2508c4473aec1d2fcb48cce6f, type: 3} propertyPath: m_RootOrder - value: 5 + value: 6 objectReference: {fileID: 0} - target: {fileID: 8856608566303270418, guid: 380bb3c2508c4473aec1d2fcb48cce6f, type: 3} diff --git a/Assets/MirageXR/Common/Scripts/AppSelection/CalibrationFlow.cs b/Assets/MirageXR/Common/Scripts/AppSelection/CalibrationFlow.cs index 53304f222..ce7688771 100644 --- a/Assets/MirageXR/Common/Scripts/AppSelection/CalibrationFlow.cs +++ b/Assets/MirageXR/Common/Scripts/AppSelection/CalibrationFlow.cs @@ -10,12 +10,18 @@ public class CalibrationFlow : MonoBehaviour private static FloorManagerWrapper floorManager => RootObject.Instance.floorManager; + private static PlaneManagerWrapper planeManager => RootObject.Instance.planeManager; + private static GridManager gridManager => RootObject.Instance.gridManager; - private string FLOOR_DETECTION_TEXT = "Floor Detection"; + private string CALIBRATION_TEXT = "Calibration"; + private string SELECT_CALIBRATION_TEXT = "Select calibration type"; + private string NEW_POSITION_TEXT = "New position"; + private string FLOOR_DETECTION_TEXT = "Floor detection"; private string HINT_MARKER_TEXT = "Look at the calibration image on a printed paper or a screen to calibrate the activity."; - private string HINT_FLOOR_TEXT = "Look at the floor and mark the floor with a pinch gesture."; + private string HINT_PLACEMENT_TEXT = "Tap on the plane to place the anchor."; + private string HINT_FLOOR_TEXT = "Look at the floor while moving your device. As a plane appears, click on it."; private string DONE_TEXT = "Done"; private int DELAY_TIME = 500; private int CLOSE_TIME = 1000; @@ -24,19 +30,31 @@ public class CalibrationFlow : MonoBehaviour [SerializeField] private TMP_Text _textMain; [SerializeField] private Interactable _btnClose; [SerializeField] private FollowMeToggle _followMeToggle; + [SerializeField] private Interactable _btnImageTarget; + [SerializeField] private Interactable _btnManualPlacement; + [SerializeField] private Interactable _btnApply; + private Pose _startPose; private System.Action _onCloseAction; + private bool _isNewPosition; public void Initialization(System.Action onCloseAction) { _onCloseAction = onCloseAction; - ResetCalibration(); _followMeToggle.SetFollowMeBehavior(true); - _btnClose.OnClick.AddListener(Close); - calibrationManager.onCalibrationStarted.AddListener(OnCalibrationStarted); - calibrationManager.onCalibrationCanceled.AddListener(OnCalibrationCanceled); + + _startPose = calibrationManager.GetAnchorPositionAsync(); calibrationManager.onCalibrationFinished.AddListener(OnCalibrationFinished); + _btnApply.gameObject.SetActive(false); + _btnImageTarget.gameObject.SetActive(false); + _btnManualPlacement.gameObject.SetActive(false); + + _btnClose.OnClick.AddListener(OnCloseButtonPressed); + _btnImageTarget.OnClick.AddListener(OnButtonImageTargetClicked); + _btnManualPlacement.OnClick.AddListener(OnButtonManualPlacementClicked); + _btnApply.OnClick.AddListener(OnApplyButtonPressed); + StartFloorDetectionAsync().AsAsyncVoid(); } @@ -46,37 +64,33 @@ private async Task StartFloorDetectionAsync() _textMain.text = HINT_FLOOR_TEXT; await Task.Delay(DELAY_TIME); - floorManager.EnableFloorDetection(OnFloorDetected); + planeManager.EnablePlanes(); + planeManager.onPlaneClicked.AddListener(OnFloorDetected); } - private void OnFloorDetected() + private void OnFloorDetected(PlaneId planeId, Vector3 position) { - OnFloorDetectedAsync().AsAsyncVoid(); + planeManager.onPlaneClicked.RemoveListener(OnFloorDetected); + OnFloorDetectedAsync(planeId, position).AsAsyncVoid(); } - private async Task OnFloorDetectedAsync() + private async Task OnFloorDetectedAsync(PlaneId planeId, Vector3 position) { + floorManager.SetFloor(planeId, position); _textMain.text = DONE_TEXT; await Task.Delay(DELAY_TIME); - floorManager.DisableFloorDetection(); - StartCalibration(); + planeManager.DisablePlanes(); + _btnImageTarget.gameObject.SetActive(true); + _btnManualPlacement.gameObject.SetActive(true); } private void StartCalibration() { - _textLabel.text = CALIBRATION_TEXT; + _textLabel.text = _isNewPosition ? NEW_POSITION_TEXT : CALIBRATION_TEXT; _textMain.text = HINT_MARKER_TEXT; - calibrationManager.EnableCalibration(); - } - - private void OnCalibrationStarted() - { - - } - - private void OnCalibrationCanceled() - { - ResetCalibration(); + _btnImageTarget.gameObject.SetActive(false); + _btnManualPlacement.gameObject.SetActive(false); + calibrationManager.EnableCalibration(true); } private void OnCalibrationFinished() @@ -97,15 +111,64 @@ private async Task OnCalibrationFinishedAsync() Close(); } - private void ResetCalibration() + private void OnCalibrationPlaceDetected(PlaneId planeId, Vector3 position) + { + _btnApply.gameObject.SetActive(true); + + var cameraPosition = Camera.main.transform.position; + var direction = cameraPosition - position; + direction.Normalize(); + var rotation = Quaternion.LookRotation(direction, Vector3.up); + rotation.x = 0; + rotation.z = 0; + calibrationManager.SetAnchorPositionAsync(new Pose(position, rotation), false); + } + + private void OnButtonImageTargetClicked() { - + StartCalibration(); + } + + private void OnButtonManualPlacementClicked() + { + StartPlaceCalibrationAsync().AsAsyncVoid(); + } + + private async Task StartPlaceCalibrationAsync() + { + await Task.Delay(DELAY_TIME); + _textLabel.text = _isNewPosition ? NEW_POSITION_TEXT : CALIBRATION_TEXT; + _btnImageTarget.gameObject.SetActive(false); + _btnManualPlacement.gameObject.SetActive(false); + planeManager.EnablePlanes(); + _textMain.text = HINT_PLACEMENT_TEXT; + planeManager.onPlaneClicked.AddListener(OnCalibrationPlaceDetected); + } + + private void OnApplyButtonPressed() + { + _btnApply.gameObject.SetActive(false); + planeManager.onPlaneClicked.RemoveListener(OnCalibrationPlaceDetected); + planeManager.DisablePlanes(); + OnCalibrationFinishedAsync(); + } + + public void OnCloseButtonPressed() + { + var pose = calibrationManager.GetAnchorPositionAsync(); + if (pose != _startPose) + { + calibrationManager.SetAnchorPositionAsync(_startPose, false); + } + + Close(); } public void Close() { + planeManager.onPlaneClicked.RemoveListener(OnCalibrationPlaceDetected); calibrationManager.DisableCalibration(); - floorManager.DisableFloorDetection(); + planeManager.DisablePlanes(); _onCloseAction?.Invoke(); Destroy(gameObject); } diff --git a/Assets/MirageXR/Common/Scripts/CalibrationTool.cs b/Assets/MirageXR/Common/Scripts/CalibrationTool.cs index 7c831d087..a9e489b3a 100644 --- a/Assets/MirageXR/Common/Scripts/CalibrationTool.cs +++ b/Assets/MirageXR/Common/Scripts/CalibrationTool.cs @@ -1,22 +1,11 @@ using System.Collections; -using i5.Toolkit.Core.VerboseLogging; using UnityEngine; -using UnityEngine.Events; namespace MirageXR { public class CalibrationTool : MonoBehaviour { [SerializeField] private CalibrationAnimation _calibrationAnimation; - [SerializeField] private UnityEvent _onCalibrationStarted = new UnityEvent(); - [SerializeField] private UnityEvent _onCalibrationCanceled = new UnityEvent(); - [SerializeField] private UnityEvent _onCalibrationFinished = new UnityEvent(); - - public UnityEvent onCalibrationStarted => _onCalibrationStarted; - - public UnityEvent onCalibrationCanceled => _onCalibrationCanceled; - - public UnityEvent onCalibrationFinished => _onCalibrationFinished; private IImageTarget _imageTarget; private float _animationTime = 5f; @@ -66,7 +55,7 @@ private void OnTargetFound(IImageTarget imageTarget) } _isTargetFound = true; - _onCalibrationStarted.Invoke(); + RootObject.Instance.calibrationManager.OnCalibrationStarted(); _calibrationAnimation.PlayAnimation(); _countdownToEnd = StartCoroutine(WaitAndDo(_animationTime, Calibrate)); } @@ -79,7 +68,7 @@ private void OnTargetLost(IImageTarget imageTarget) } _isTargetFound = false; - _onCalibrationCanceled.Invoke(); + RootObject.Instance.calibrationManager.OnCalibrationCanceled(); _calibrationAnimation.StopAnimation(); if (_countdownToEnd != null) { @@ -93,7 +82,10 @@ private void Calibrate() _calibrationAnimation.StopAnimation(); if (_isTargetFound) { - _onCalibrationFinished.Invoke(); + var eulerAngles = transform.rotation.eulerAngles; + var rotation = new Vector3(0, eulerAngles.x + eulerAngles.y + eulerAngles.z - 90f, 0); + var position = transform.position; + RootObject.Instance.calibrationManager.OnCalibrationFinished(new Pose(position, Quaternion.Euler(rotation))); } if (_countdownToEnd != null) diff --git a/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs b/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs index 9886792cc..91ee8e4e2 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs @@ -78,7 +78,7 @@ public void DisableCalibration() _isRecalibration = false; _isEnabled = false; - if (_imageTarget != null && _calibrationTool) + if (_imageTarget != null && _calibrationTool != null) { _calibrationTool.Disable(); } @@ -154,46 +154,46 @@ private bool InitCalibrationTool(IImageTarget imageTarget) } _calibrationTool.Initialization(ANIMATION_TIME); - _calibrationTool.onCalibrationStarted.RemoveAllListeners(); - _calibrationTool.onCalibrationStarted.AddListener(OnCalibrationStarted); - _calibrationTool.onCalibrationCanceled.RemoveAllListeners(); - _calibrationTool.onCalibrationCanceled.AddListener(OnCalibrationCanceled); - _calibrationTool.onCalibrationFinished.RemoveAllListeners(); - _calibrationTool.onCalibrationFinished.AddListener(OnCalibrationFinished); return true; } - private void OnCalibrationStarted() + public void OnCalibrationStarted() { _onCalibrationStarted.Invoke(); } - private void OnCalibrationCanceled() + public void OnCalibrationCanceled() { _onCalibrationCanceled.Invoke(); } - private void OnCalibrationFinished() + public void OnCalibrationFinished(Pose pose) { - OnCalibrationFinishedAsync().AsAsyncVoid(); + OnCalibrationFinishedAsync(pose).AsAsyncVoid(); } - private async Task OnCalibrationFinishedAsync() + public Pose GetAnchorPositionAsync() { - UpdateAnchorPosition(); - await RootObject.Instance.workplaceManager.CalibrateWorkplace(_anchor, _isRecalibration); + return _anchor.GetPose(); + } + + public async Task SetAnchorPositionAsync(Pose pose, bool resetAnchor) + { + UpdateAnchorPosition(pose); + await RootObject.Instance.workplaceManager.CalibrateWorkplace(resetAnchor); + } + + private async Task OnCalibrationFinishedAsync(Pose pose) + { + await SetAnchorPositionAsync(pose, _isRecalibration); DisableCalibration(); _onCalibrationFinished.Invoke(); } - private void UpdateAnchorPosition() + private void UpdateAnchorPosition(Pose pose) { - var eulerAngles = _calibrationTool.transform.eulerAngles; - var rotation = new Vector3(0, eulerAngles.x + eulerAngles.y + eulerAngles.z - 90f, 0); - var position = _calibrationTool.transform.position; - - var arAnchor = floorManager.CreateAnchor(new Pose(position, Quaternion.Euler(rotation))); + var arAnchor = floorManager.CreateAnchor(pose); if (!arAnchor) { @@ -209,7 +209,7 @@ private void UpdateAnchorPosition() } _debugSphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); - _debugSphere.transform.position = _calibrationTool.transform.position; + _debugSphere.transform.position = pose.position; _debugSphere.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f); } @@ -233,12 +233,9 @@ private static Transform CreateAnchor() anchorTransform.rotation = Quaternion.identity; anchorTransform.localScale = Vector3.one; - if (DBManager.developMode) - { - var capsule = GameObject.CreatePrimitive(PrimitiveType.Capsule); - capsule.transform.SetParent(anchorTransform, true); - capsule.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f); - } + //var capsule = GameObject.CreatePrimitive(PrimitiveType.Sphere); + //capsule.transform.SetParent(anchorTransform, true); + //capsule.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f); return anchorTransform; } diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/FloorManagerWrapper.cs b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/FloorManagerWrapper.cs index 059998f91..3e29fca64 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/FloorManagerWrapper.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/FloorManagerWrapper.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; +using MirageXR; using UnityEngine; -using UnityEngine.Events; public class FloorManagerWrapper : MonoBehaviour { @@ -16,21 +16,10 @@ public enum ForceManagerType [SerializeField] private ForceManagerType _forceManagerType = ForceManagerType.Default; [SerializeField] private GameObject _prefabARFoundationAnchor; - [SerializeField] private GameObject _prefabARFoundationPlane; [SerializeField] private GameObject _prefabEditorAnchor; - [SerializeField] private GameObject _prefabEditorPlane; - - [SerializeField] private UnityEvent _onDetectionEnabled = new UnityEvent(); - [SerializeField] private UnityEvent _onDetectionDisabled = new UnityEvent(); - - public UnityEvent onDetectionEnabled => _onDetectionEnabled; - - public UnityEvent onDetectionDisabled => _onDetectionDisabled; private IFloorManager _floorManager; - public IFloorManager manager => _floorManager; - public async Task InitializationAsync() { _floorManager = CreateFloorManager(); @@ -54,10 +43,6 @@ public async Task InitializationAsync() } } - public bool enableColliders => _floorManager.enableColliders; - - public bool showPlanes => _floorManager.showPlanes; - public float floorLevel => _floorManager.floorLevel; public bool isFloorDetected => _floorManager.isFloorDetected; @@ -72,26 +57,10 @@ public Transform CreateAnchor(Pose pose) return _floorManager.CreateAnchor(pose); } - public void SetFloor(IPlaneBehaviour floor) - { - _floorManager.SetFloor(floor); - } - - public void EnableFloorDetection(Action onFloorDetected) - { - _onDetectionEnabled.Invoke(); - _floorManager.EnableFloorDetection(onFloorDetected); - } - - public void DisableFloorDetection() - { - onDetectionDisabled.Invoke(); - _floorManager.DisableFloorDetection(); - } - - public void Dispose() + public void SetFloor(PlaneId planeId, Vector3 position) { - _floorManager?.Dispose(); + _floorManager.SetFloor(planeId, position); + RootObject.Instance.planeManager.SelectPlane(planeId); } private IFloorManager CreateFloorManager() @@ -103,12 +72,10 @@ private IFloorManager CreateFloorManager() case ForceManagerType.Editor: var managerEditor = gameObject.AddComponent(); managerEditor.prefabAnchor = _prefabEditorAnchor; - managerEditor.prefabPlane = _prefabEditorPlane; return managerEditor; case ForceManagerType.ARFoundation: var managerARFoundation = gameObject.AddComponent(); managerARFoundation.prefabAnchor = _prefabARFoundationAnchor; - managerARFoundation.prefabPlane = _prefabARFoundationPlane; return managerARFoundation; case ForceManagerType.MRTK: return gameObject.AddComponent(); @@ -122,11 +89,9 @@ private IFloorManager CreateDefaultImageTargetManager() #if UNITY_EDITOR var floorManager = gameObject.AddComponent(); floorManager.prefabAnchor = _prefabEditorAnchor; - floorManager.prefabPlane = _prefabEditorPlane; #elif UNITY_IOS || UNITY_ANDROID var floorManager = gameObject.AddComponent(); floorManager.prefabAnchor = _prefabARFoundationAnchor; - floorManager.prefabPlane = _prefabARFoundationPlane; #else var floorManager = gameObject.AddComponent(); #endif diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerARFoundation.cs b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerARFoundation.cs index 7b5cf4af3..defe3bb52 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerARFoundation.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerARFoundation.cs @@ -3,28 +3,17 @@ using UnityEngine; using UnityEngine.XR.ARFoundation; using UnityEngine.XR.ARSubsystems; -using Action = System.Action; public class FloorManagerARFoundation : FloorManagerBase { private const float _DEFAULT_FLOOR_LEVEL = -1f; - private const PlaneDetectionMode DETECTION_MODE = PlaneDetectionMode.Horizontal | PlaneDetectionMode.Vertical; private GameObject _prefabAnchor; - private GameObject _prefabPlane; - private ARPlaneManager _arPlaneManager; private ARAnchorManager _arAnchorManager; private ARSession _arSession; - private TrackableId _floorId = TrackableId.invalidId; - private bool _enableColliders; - private bool _showPlanes; - private ARFoundationPlaneBehaviour _debugARFoundationPlane; + private PlaneId _planeId = PlaneId.InvalidId; private Vector3 _floorLevel; - private ARPlane _floorPlane; - - public override bool enableColliders => _enableColliders; - - public override bool showPlanes => _showPlanes; + private GameObject _floorPlane; public override float floorLevel { @@ -35,11 +24,6 @@ public override float floorLevel return _DEFAULT_FLOOR_LEVEL; } - //if (!_floorPlane) - //{ - // _floorPlane = _arPlaneManager.GetPlane(_floorId); - //} - if (_floorPlane) { _floorLevel = _floorPlane.transform.position; @@ -55,20 +39,7 @@ public GameObject prefabAnchor set => _prefabAnchor = value; } - public GameObject prefabPlane - { - get => _prefabPlane; - set => _prefabPlane = value; - } - - public TrackableId floorId => _floorId; - - public override bool isFloorDetected => floorId != TrackableId.invalidId; - - public override void Dispose() - { - EventManager.OnEditModeChanged -= OnEditModeChanged; - } + public override bool isFloorDetected => _planeId != PlaneId.InvalidId; public override async Task InitializationAsync() { @@ -83,19 +54,10 @@ public override async Task InitializationAsync() var cameraParent = mainCamera.transform.parent ? mainCamera.transform.parent.gameObject : mainCamera.gameObject; _arSession = Utilities.FindOrCreateComponent(cameraParent); - _arPlaneManager = Utilities.FindOrCreateComponent(cameraParent); _arAnchorManager = Utilities.FindOrCreateComponent(cameraParent); - _arPlaneManager.requestedDetectionMode = DETECTION_MODE; - _arPlaneManager.planePrefab = _prefabPlane; - await Task.Yield(); - _enableColliders = false; - _showPlanes = false; - - EventManager.OnEditModeChanged += OnEditModeChanged; - return true; } @@ -107,31 +69,17 @@ public override async Task ResetAsync() return false; } - if (!_arPlaneManager) - { - Debug.LogError("ARPlaneManager is null"); - return false; - } - if (!_arAnchorManager) { Debug.LogError("ARAnchorManager is null"); return false; } - foreach (var arPlane in _arPlaneManager.trackables) - { - Destroy(arPlane.gameObject); - } - - Destroy(_arPlaneManager); Destroy(_arAnchorManager); - _floorId = TrackableId.invalidId; - _onFloorDetected = null; + _planeId = PlaneId.InvalidId; await Task.Yield(); - await InitializationAsync(); return true; @@ -139,7 +87,7 @@ public override async Task ResetAsync() public override Transform CreateAnchor(Pose pose) { - if (_floorId == TrackableId.invalidId) + if (_planeId == PlaneId.InvalidId) { Debug.LogError("Floor is not detected"); return null; @@ -148,11 +96,17 @@ public override Transform CreateAnchor(Pose pose) var oldPrefab = _arAnchorManager.anchorPrefab; _arAnchorManager.anchorPrefab = _prefabAnchor; - var plane = _arPlaneManager.GetPlane(_floorId); + var planeGameObject = RootObject.Instance.planeManager.GetPlane(_planeId); + if (planeGameObject == null) + { + Debug.LogError($"Can't find GameObject with id: {_planeId}"); + return null; + } + var plane = planeGameObject.GetComponent(); if (!plane) { - Debug.LogError($"Can't find plane with id: {_floorId}"); + Debug.LogError($"Can't find plane with id: {_planeId}"); return null; } @@ -163,60 +117,16 @@ public override Transform CreateAnchor(Pose pose) return anchor.transform; } - public override void SetFloor(IPlaneBehaviour floor) - { - var arFloor = floor as ARFoundationPlaneBehaviour; - _floorId = arFloor.trackableId; - - _floorLevel = arFloor.transform.position; - _floorPlane = _arPlaneManager.GetPlane(_floorId); - - _onFloorDetected?.Invoke(); - UpdatePlanes(); - } - - public override void EnableFloorDetection(Action onFloorDetected) + public override void SetFloor(PlaneId planeId, Vector3 position) { - if (_enableColliders) + _planeId = planeId; + _floorLevel = position; + var planeGameObject = RootObject.Instance.planeManager.GetPlane(_planeId); + if (planeGameObject == null) { - return; + Debug.LogError($"Can't find GameObject with id: {_planeId}"); } - _enableColliders = true; - _onFloorDetected = onFloorDetected; - _showPlanes = true; - - UpdatePlanes(); - } - - public override void DisableFloorDetection() - { - if (!_enableColliders) - { - return; - } - - _onFloorDetected = null; - _enableColliders = false; - _showPlanes = RootObject.Instance.activityManager.EditModeActive; - UpdatePlanes(); - } - - private void OnEditModeChanged(bool value) - { - _showPlanes = value || _enableColliders; - UpdatePlanes(); - } - - private void UpdatePlanes() - { - foreach (var plane in _arPlaneManager.trackables) - { - var planeBehaviour = plane.GetComponent(); - if (planeBehaviour) - { - planeBehaviour.UpdateState(); - } - } + _floorPlane = planeGameObject; } } diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerBase.cs b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerBase.cs index 6e4a4f20a..e9a22e336 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerBase.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerBase.cs @@ -6,12 +6,6 @@ public abstract class FloorManagerBase : MonoBehaviour, IFloorManager { protected const float _DEFAULT_FLOOR_LEVEL = -1.7f; - protected Action _onFloorDetected; - - public abstract bool enableColliders { get; } - - public abstract bool showPlanes { get; } - public abstract float floorLevel { get; } public abstract bool isFloorDetected { get; } @@ -22,11 +16,5 @@ public abstract class FloorManagerBase : MonoBehaviour, IFloorManager public abstract Transform CreateAnchor(Pose pose); - public abstract void SetFloor(IPlaneBehaviour floor); - - public abstract void EnableFloorDetection(Action onFloorDetected); - - public abstract void DisableFloorDetection(); - - public abstract void Dispose(); + public abstract void SetFloor(PlaneId planeId, Vector3 position); } diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerEditor.cs b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerEditor.cs index 32eb9f58a..bf5ff5af8 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerEditor.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerEditor.cs @@ -1,32 +1,19 @@ using System.Threading.Tasks; using MirageXR; using UnityEngine; -using Action = System.Action; public class FloorManagerEditor : FloorManagerBase { - private GameObject _prefabPlane; private GameObject _prefabAnchor; private EditorPlaneBehaviour _plane; private Vector3 _floorLevel; private bool _enableColliders; - private bool _showPlanes; - private bool _isFloorDetected; + private PlaneId _planeId; private GameObject _anchor; - public override bool enableColliders => _enableColliders; - - public override bool showPlanes => _showPlanes; - public override float floorLevel => _floorLevel.y; - public override bool isFloorDetected => _isFloorDetected; - - public GameObject prefabPlane - { - get => _prefabPlane; - set => _prefabPlane = value; - } + public override bool isFloorDetected => _planeId != PlaneId.InvalidId; public GameObject prefabAnchor { @@ -36,8 +23,7 @@ public GameObject prefabAnchor public override Task InitializationAsync() { - _isFloorDetected = false; - EventManager.OnEditModeChanged += OnEditModeChanged; + _planeId = PlaneId.InvalidId; _floorLevel = new Vector3(0, _DEFAULT_FLOOR_LEVEL, 0); return Task.FromResult(true); } @@ -45,8 +31,7 @@ public override Task InitializationAsync() public override Task ResetAsync() { _floorLevel = new Vector3(0, _DEFAULT_FLOOR_LEVEL, 0); - _isFloorDetected = false; - _onFloorDetected = null; + _planeId = PlaneId.InvalidId; return Task.FromResult(true); } @@ -62,58 +47,9 @@ public override Transform CreateAnchor(Pose pose) return _anchor.transform; } - public override void SetFloor(IPlaneBehaviour floor) - { - var editorFloor = floor as EditorPlaneBehaviour; - - _floorLevel = editorFloor.transform.position; - - _isFloorDetected = true; - - _onFloorDetected?.Invoke(); - UpdatePlanes(); - } - - public override void EnableFloorDetection(Action onFloorDetected) - { - if (!_plane) - { - var obj = Instantiate(_prefabPlane); - _plane = obj.GetComponent(); - } - - _enableColliders = true; - _showPlanes = true; - - UpdatePlanes(); - _onFloorDetected = onFloorDetected; - } - - public override void DisableFloorDetection() - { - _onFloorDetected = null; - _enableColliders = false; - _showPlanes = RootObject.Instance.activityManager.EditModeActive; - - UpdatePlanes(); - } - - public override void Dispose() + public override void SetFloor(PlaneId planeId, Vector3 position) { - EventManager.OnEditModeChanged -= OnEditModeChanged; - } - - private void OnEditModeChanged(bool value) - { - _showPlanes = value || _enableColliders; - UpdatePlanes(); - } - - private void UpdatePlanes() - { - if (_plane) - { - _plane.UpdateState(); - } + _planeId = planeId; + _floorLevel = position; } } diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerMRTK.cs b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerMRTK.cs index 5cb96fff4..921960c1f 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerMRTK.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/FloorManagerMRTK.cs @@ -1,28 +1,22 @@ using System.Threading.Tasks; -using Microsoft.MixedReality.Toolkit.Input; using MirageXR; using UnityEngine; -using Action = System.Action; public class FloorManagerMRTK : FloorManagerBase { + private const string AR_ANCHOR = "ARAnchor"; + private GameObject _anchor; private GlobalClickListener _globalClickListener; - private Action _onFloorDetected; - private MRTKPlaneBehavior _floorPoint; - private int _planeLayer; - - public override bool enableColliders => false; - - public override bool showPlanes => false; + private Vector3 _floorLevel; + private bool _isFloorDetected; - public override float floorLevel => _floorPoint ? _floorPoint.GetPosition().y : _DEFAULT_FLOOR_LEVEL; + public override float floorLevel => _isFloorDetected ? _floorLevel.y : _DEFAULT_FLOOR_LEVEL; - public override bool isFloorDetected => _floorPoint != null; + public override bool isFloorDetected => _isFloorDetected; public override Task InitializationAsync() { - _planeLayer = LayerMask.NameToLayer("Spatial Awareness"); return Task.FromResult(true); } @@ -39,88 +33,15 @@ public override Transform CreateAnchor(Pose pose) _anchor = null; } - _anchor = new GameObject("ARAnchor"); + _anchor = new GameObject(AR_ANCHOR); _anchor.SetPose(pose); return _anchor.transform; } - public override void SetFloor(IPlaneBehaviour floor) - { - if (_floorPoint) - { - Destroy(_floorPoint); - } - - _floorPoint = (MRTKPlaneBehavior)floor; - _onFloorDetected?.Invoke(); - } - - public override void EnableFloorDetection(Action onFloorDetected) - { - _onFloorDetected = onFloorDetected; - - if (!_globalClickListener) - { - _globalClickListener = gameObject.AddComponent(); - } - - _globalClickListener.onClickEvent.AddListener(OnClicked); - } - - public override void DisableFloorDetection() - { - _globalClickListener.onClickEvent.RemoveAllListeners(); - if (_globalClickListener) - { - Destroy(_globalClickListener); - } - } - - public override void Dispose() - { - if (_floorPoint) - { - Destroy(_floorPoint); - } - - if (_globalClickListener) - { - Destroy(_globalClickListener); - } - } - - private void OnClicked(InputEventData eventData) + public override void SetFloor(PlaneId planeId, Vector3 position) { - if (eventData?.InputSource?.Pointers == null) - { - return; - } - - foreach (var pointer in eventData.InputSource.Pointers) - { - if (pointer?.Result?.CurrentPointerTarget == null) - { - continue; - } - - var layer = pointer.Result.CurrentPointerTarget.layer; - - if (layer != _planeLayer) - { - continue; - } - - if (pointer.Result?.Details == null) - { - continue; - } - - var position = pointer.Result.Details.Point; - var obj = new GameObject("floorPoint"); - var floorPoint = obj.AddComponent(); - floorPoint.transform.position = position; - SetFloor(floorPoint); - } + _floorLevel = position; + _isFloorDetected = true; } } diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/IFloorManager.cs b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/IFloorManager.cs index 34d838bf1..e77db6db8 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/IFloorManager.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Managers/IFloorManager.cs @@ -1,38 +1,17 @@ -using System; using System.Threading.Tasks; using UnityEngine; -public interface IFloorManager : IDisposable +public interface IFloorManager { - public bool enableColliders - { - get; - } + public float floorLevel { get; } - public bool showPlanes - { - get; - } + public bool isFloorDetected { get; } - public float floorLevel - { - get; - } + public Task InitializationAsync(); - public bool isFloorDetected - { - get; - } + public Task ResetAsync(); - Task InitializationAsync(); + public Transform CreateAnchor(Pose pose); - Task ResetAsync(); - - Transform CreateAnchor(Pose pose); - - void SetFloor(IPlaneBehaviour floor); - - void EnableFloorDetection(Action onFloorDetected); - - void DisableFloorDetection(); + public void SetFloor(PlaneId planeId, Vector3 position); } diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane.meta b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane.meta index e91b8c6cf..6d459a30c 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane.meta +++ b/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7b2e06530ff356d42b1d780ddff34471 +guid: b8381d348a8729c45a05b2ec24b488ec folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager.meta new file mode 100644 index 000000000..78c822ebf --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ed33af8a175f9545b2e83ba2b4cf0ce +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/GlobalClickListener.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/GlobalClickListener.cs similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/GlobalClickListener.cs rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/GlobalClickListener.cs diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/GlobalClickListener.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/GlobalClickListener.cs.meta similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/GlobalClickListener.cs.meta rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/GlobalClickListener.cs.meta diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers.meta new file mode 100644 index 000000000..512db4ad4 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4006742de4101c5498f8c905f80b9812 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/IPlaneManager.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/IPlaneManager.cs new file mode 100644 index 000000000..bde9f7174 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/IPlaneManager.cs @@ -0,0 +1,24 @@ +using System; +using System.Threading.Tasks; +using UnityEngine; + +public interface IPlaneManager : IDisposable +{ + public UnityEventPlaneIdVector3 onPlaneClicked { get; } + + public Task InitializationAsync(); + + public Task ResetAsync(); + + public void OnPlaneClicked(PlaneId planeId, Vector3 position); + + public void EnablePlanes(); + + public void DisablePlanes(); + + public void SelectPlane(PlaneId planeId); + + public GameObject GetPlane(PlaneId planeId); + + public void UpdatePlanes(); +} diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/IPlaneManager.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/IPlaneManager.cs.meta new file mode 100644 index 000000000..5fdae3cad --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/IPlaneManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46d06907a158d5640807855d1bd88a76 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerARFoundation.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerARFoundation.cs new file mode 100644 index 000000000..f14b62276 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerARFoundation.cs @@ -0,0 +1,155 @@ +using System.Threading.Tasks; +using MirageXR; +using UnityEngine; +using UnityEngine.XR.ARFoundation; +using UnityEngine.XR.ARSubsystems; + +public class PlaneManagerARFoundation : PlaneManagerBase +{ + private const PlaneDetectionMode DETECTION_MODE = PlaneDetectionMode.Horizontal | PlaneDetectionMode.Vertical; + + public override UnityEventPlaneIdVector3 onPlaneClicked => _onPlaneClicked; + + private GameObject _prefabPlane; + private ARPlaneManager _arPlaneManager; + private ARSession _arSession; + private bool _enableColliders; + private bool _showPlanes; + private ARFoundationPlaneBehaviour _debugARFoundationPlane; + private UnityEventPlaneIdVector3 _onPlaneClicked = new UnityEventPlaneIdVector3(); + + public GameObject prefabPlane + { + get => _prefabPlane; + set => _prefabPlane = value; + } + + public override async Task InitializationAsync() + { + var mainCamera = Camera.main; + + if (!mainCamera) + { + Debug.LogError("Can't find camera main"); + return false; + } + + var cameraParent = mainCamera.transform.parent ? mainCamera.transform.parent.gameObject : mainCamera.gameObject; + + _arSession = Utilities.FindOrCreateComponent(cameraParent); + _arPlaneManager = Utilities.FindOrCreateComponent(cameraParent); + + _arPlaneManager.requestedDetectionMode = DETECTION_MODE; + _arPlaneManager.planePrefab = _prefabPlane; + + await Task.Yield(); + + _enableColliders = false; + _showPlanes = false; + + EventManager.OnEditModeChanged += OnEditModeChanged; + + return true; + } + + public override async Task ResetAsync() + { + if (!_arSession) + { + Debug.LogError("ARSession is null"); + return false; + } + + if (!_arPlaneManager) + { + Debug.LogError("ARPlaneManager is null"); + return false; + } + + foreach (var arPlane in _arPlaneManager.trackables) + { + Destroy(arPlane.gameObject); + } + + Destroy(_arPlaneManager); + + + await Task.Yield(); + await InitializationAsync(); + + return true; + } + + public override void OnPlaneClicked(PlaneId planeId, Vector3 position) + { + _onPlaneClicked.Invoke(planeId, position); + } + + public override void EnablePlanes() + { + if (_enableColliders) + { + return; + } + + _enableColliders = true; + _showPlanes = true; + + UpdatePlanes(); + } + + public override void DisablePlanes() + { + if (!_enableColliders) + { + return; + } + + _enableColliders = false; + _showPlanes = RootObject.Instance.activityManager.EditModeActive; + UpdatePlanes(); + } + + public override void SelectPlane(PlaneId planeId) + { + ARFoundationPlaneBehaviour.SetSelectedPlane(planeId); + UpdatePlanes(); + } + + public override GameObject GetPlane(PlaneId planeId) + { + var plane = _arPlaneManager.GetPlane(new TrackableId(planeId.subId1, planeId.subId2)); + if (plane == null) + { + Debug.LogError($"Can't find plane with id: {planeId}"); + return null; + } + + return plane.gameObject; + } + + public override void UpdatePlanes() + { + ARFoundationPlaneBehaviour.UpdatePlanesState(_showPlanes, _enableColliders, OnPlaneClicked); + + foreach (var plane in _arPlaneManager.trackables) + { + var planeBehaviour = plane.GetComponent(); + if (planeBehaviour) + { + planeBehaviour.UpdateState(); + } + } + } + + public override void Dispose() + { + EventManager.OnEditModeChanged -= OnEditModeChanged; + } + + private void OnEditModeChanged(bool value) + { + _showPlanes = value || _enableColliders; + UpdatePlanes(); + } +} diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerARFoundation.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerARFoundation.cs.meta new file mode 100644 index 000000000..324daaeb5 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerARFoundation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b05323ced589ca646896d5eae0c3c65b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerBase.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerBase.cs new file mode 100644 index 000000000..e110c409b --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerBase.cs @@ -0,0 +1,25 @@ +using System.Threading.Tasks; +using UnityEngine; + +public abstract class PlaneManagerBase : MonoBehaviour, IPlaneManager +{ + public abstract UnityEventPlaneIdVector3 onPlaneClicked { get; } + + public abstract Task InitializationAsync(); + + public abstract Task ResetAsync(); + + public abstract void OnPlaneClicked(PlaneId planeId, Vector3 position); + + public abstract void EnablePlanes(); + + public abstract void DisablePlanes(); + + public abstract void SelectPlane(PlaneId planeId); + + public abstract GameObject GetPlane(PlaneId planeId); + + public abstract void UpdatePlanes(); + + public abstract void Dispose(); +} diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerBase.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerBase.cs.meta new file mode 100644 index 000000000..2ab0bb1c5 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 122020b6685d3ca4f8d4b39404c5ce7c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerEditor.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerEditor.cs new file mode 100644 index 000000000..55ddf8579 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerEditor.cs @@ -0,0 +1,92 @@ +using System.Threading.Tasks; +using MirageXR; +using UnityEngine; + +public class PlaneManagerEditor : PlaneManagerBase +{ + public override UnityEventPlaneIdVector3 onPlaneClicked => _onPlaneClicked; + + private GameObject _prefabPlane; + private EditorPlaneBehaviour _plane; + private Vector3 _floorLevel; + private bool _enableColliders; + private bool _showPlanes; + private bool _isFloorDetected; + private GameObject _anchor; + private UnityEventPlaneIdVector3 _onPlaneClicked = new UnityEventPlaneIdVector3(); + + public GameObject prefabPlane + { + get => _prefabPlane; + set => _prefabPlane = value; + } + + public override Task InitializationAsync() + { + EventManager.OnEditModeChanged += OnEditModeChanged; + return Task.FromResult(true); + } + + public override Task ResetAsync() + { + return Task.FromResult(true); + } + + public override void OnPlaneClicked(PlaneId planeId, Vector3 position) + { + _onPlaneClicked.Invoke(planeId, position); + } + + public override void EnablePlanes() + { + if (!_plane) + { + var obj = Instantiate(_prefabPlane); + _plane = obj.GetComponent(); + } + + _enableColliders = true; + _showPlanes = true; + + UpdatePlanes(); + } + + public override void DisablePlanes() + { + _enableColliders = false; + _showPlanes = RootObject.Instance.activityManager.EditModeActive; + + UpdatePlanes(); + } + + public override void SelectPlane(PlaneId planeId) + { + EditorPlaneBehaviour.SetSelectedPlane(planeId); + UpdatePlanes(); + } + + public override GameObject GetPlane(PlaneId planeId) + { + return _plane.gameObject; + } + + public override void UpdatePlanes() + { + EditorPlaneBehaviour.UpdatePlanesState(_showPlanes, _enableColliders, OnPlaneClicked); + if (_plane) + { + _plane.UpdateState(); + } + } + + public override void Dispose() + { + EventManager.OnEditModeChanged -= OnEditModeChanged; + } + + private void OnEditModeChanged(bool value) + { + _showPlanes = value || _enableColliders; + UpdatePlanes(); + } +} diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerEditor.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerEditor.cs.meta new file mode 100644 index 000000000..14a84d73b --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9e82c26b03738de4ab2181a1cb2c8c93 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerMRTK.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerMRTK.cs new file mode 100644 index 000000000..569051224 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerMRTK.cs @@ -0,0 +1,105 @@ +using System.Threading.Tasks; +using Microsoft.MixedReality.Toolkit.Input; +using UnityEngine; + + +public class PlaneManagerMRTK : PlaneManagerBase +{ + private const string SPATIAL_AWARENESS = "Spatial Awareness"; + + public override UnityEventPlaneIdVector3 onPlaneClicked => _onPlaneClicked; + + private GlobalClickListener _globalClickListener; + private MRTKPlaneBehavior _floorPoint; + private int _planeLayer; + private UnityEventPlaneIdVector3 _onPlaneClicked = new UnityEventPlaneIdVector3(); + + + public override Task InitializationAsync() + { + _planeLayer = LayerMask.NameToLayer(SPATIAL_AWARENESS); + _globalClickListener = gameObject.AddComponent(); + _globalClickListener.enabled = false; + return Task.FromResult(true); + } + + public override Task ResetAsync() + { + return Task.FromResult(true); + } + + public override void OnPlaneClicked(PlaneId plane, Vector3 position) + { + _onPlaneClicked.Invoke(plane, position); + } + + public override void EnablePlanes() + { + _globalClickListener.enabled = true; + _globalClickListener.onClickEvent.AddListener(OnClicked); + } + + public override void DisablePlanes() + { + _globalClickListener.onClickEvent.RemoveAllListeners(); + _globalClickListener.enabled = false; + } + + public override void SelectPlane(PlaneId planeId) + { + /* ignore */ + } + + public override GameObject GetPlane(PlaneId planeId) + { + return null; /* ignore */ + } + + public override void UpdatePlanes() + { + /* ignore */ + } + + public override void Dispose() + { + if (_floorPoint) + { + Destroy(_floorPoint); + } + + if (_globalClickListener) + { + Destroy(_globalClickListener); + } + } + + private void OnClicked(InputEventData eventData) + { + if (eventData?.InputSource?.Pointers == null) + { + return; + } + + foreach (var pointer in eventData.InputSource.Pointers) + { + if (pointer?.Result?.CurrentPointerTarget == null) + { + continue; + } + + var layer = pointer.Result.CurrentPointerTarget.layer; + + if (layer != _planeLayer) + { + continue; + } + + if (pointer.Result?.Details == null) + { + continue; + } + + OnPlaneClicked(new PlaneId(1, 1), pointer.Result.Details.Point); + } + } +} diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerMRTK.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerMRTK.cs.meta new file mode 100644 index 000000000..0928d3bde --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Managers/PlaneManagerMRTK.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e06f32407e9fe7a4789f0e7311caa2a2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane.meta new file mode 100644 index 000000000..e91b8c6cf --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b2e06530ff356d42b1d780ddff34471 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/ARFoundationPlaneBehaviour.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/ARFoundationPlaneBehaviour.cs similarity index 62% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/ARFoundationPlaneBehaviour.cs rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/ARFoundationPlaneBehaviour.cs index 8fd3f5592..504effdc3 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/ARFoundationPlaneBehaviour.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/ARFoundationPlaneBehaviour.cs @@ -1,5 +1,5 @@ +using System; using Microsoft.MixedReality.Toolkit.Input; -using MirageXR; using UnityEngine; using UnityEngine.XR.ARFoundation; using UnityEngine.XR.ARSubsystems; @@ -7,10 +7,13 @@ [RequireComponent(typeof(ARPlane), typeof(MeshCollider), typeof(MeshRenderer))] public class ARFoundationPlaneBehaviour : MonoBehaviour, IPlaneBehaviour, IMixedRealityPointerHandler { - private static FloorManagerWrapper floorManager => RootObject.Instance.floorManager; - private static readonly int _textureTintColor = Shader.PropertyToID("_TexTintColor"); + private static bool _isActive = false; + private static bool _isCollidersEnabled = false; + private static Action _onClicked; + private static TrackableId _specialPlaneId = TrackableId.invalidId; + [SerializeField] private Color _colorDefault = new Color(1f, 1f, 1f, 0.7f); [SerializeField] private Color _colorFloor = new Color(0.03f, 1f, 0.09f, 0.7f); @@ -18,16 +21,27 @@ public class ARFoundationPlaneBehaviour : MonoBehaviour, IPlaneBehaviour, IMixed private MeshRenderer _meshRenderer; private ARPlane _arPlane; - public TrackableId trackableId => _arPlane.trackableId; + public TrackableId trackableId => _arPlane.trackableId; + + public static void SetSelectedPlane(PlaneId planeId) + { + _specialPlaneId = new TrackableId(planeId.subId1, planeId.subId2); + } + + public static void UpdatePlanesState(bool isActive, bool isCollidersEnabled, Action onClicked) + { + _isActive = isActive; + _isCollidersEnabled = isCollidersEnabled; + _onClicked = onClicked; + } public void UpdateState() { - _meshCollider.enabled = floorManager.enableColliders; + _meshCollider.enabled = _isCollidersEnabled; - var manager = floorManager.manager as FloorManagerARFoundation; - if (trackableId != manager.floorId) + if (trackableId != _specialPlaneId) { - gameObject.SetActive(floorManager.showPlanes); + gameObject.SetActive(_isActive); _meshRenderer.material.color = _colorDefault; } else @@ -57,7 +71,7 @@ public void OnPointerUp(MixedRealityPointerEventData eventData) { } public void OnPointerClicked(MixedRealityPointerEventData eventData) { - floorManager.SetFloor(this); + _onClicked?.Invoke(new PlaneId(trackableId.subId1, trackableId.subId2), eventData.Pointer.Result.Details.Point); } public Vector3 GetPosition() diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/ARFoundationPlaneBehaviour.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/ARFoundationPlaneBehaviour.cs.meta similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/ARFoundationPlaneBehaviour.cs.meta rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/ARFoundationPlaneBehaviour.cs.meta diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/EditorPlaneBehaviour.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/EditorPlaneBehaviour.cs similarity index 58% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/EditorPlaneBehaviour.cs rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/EditorPlaneBehaviour.cs index 81e8a880d..235cf8930 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/EditorPlaneBehaviour.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/EditorPlaneBehaviour.cs @@ -1,33 +1,47 @@ +using System; using Microsoft.MixedReality.Toolkit.Input; -using MirageXR; using UnityEngine; [RequireComponent(typeof(MeshCollider), typeof(MeshRenderer))] public class EditorPlaneBehaviour : MonoBehaviour, IPlaneBehaviour, IMixedRealityPointerHandler { - private static FloorManagerWrapper floorManager => RootObject.Instance.floorManager; - - private static readonly int _textureTintColor = Shader.PropertyToID("_TexTintColor"); + private static bool _isActive = false; + private static bool _isCollidersEnabled = false; + private static Action _onClicked; + private static PlaneId _specialPlaneId = PlaneId.InvalidId; [SerializeField] private Color _colorDefault = new Color(1f, 1f, 1f, 0.7f); [SerializeField] private Color _colorFloor = new Color(0.03f, 1f, 0.09f, 0.7f); private MeshCollider _meshCollider; private MeshRenderer _meshRenderer; + private PlaneId _planeId = new PlaneId(1, 1); + + public static void SetSelectedPlane(PlaneId planeId) + { + _specialPlaneId = planeId; + } + + public static void UpdatePlanesState(bool isActive, bool isCollidersEnabled, Action onClicked) + { + _isActive = isActive; + _isCollidersEnabled = isCollidersEnabled; + _onClicked = onClicked; + } public void UpdateState() { - _meshCollider.enabled = floorManager.enableColliders; + _meshCollider.enabled = _isCollidersEnabled; - if (!floorManager.manager.isFloorDetected) + if (_planeId != _specialPlaneId) { - gameObject.SetActive(floorManager.showPlanes); + gameObject.SetActive(_isActive); _meshRenderer.material.color = _colorDefault; } else { gameObject.SetActive(true); - _meshRenderer.material.SetColor(_textureTintColor, _colorFloor); + _meshRenderer.material.color = _colorFloor; } } @@ -50,7 +64,7 @@ public void OnPointerUp(MixedRealityPointerEventData eventData) { } public void OnPointerClicked(MixedRealityPointerEventData eventData) { - floorManager.SetFloor(this); + _onClicked?.Invoke(_planeId, eventData.Pointer.Result.Details.Point); } public Vector3 GetPosition() diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/EditorPlaneBehaviour.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/EditorPlaneBehaviour.cs.meta similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/EditorPlaneBehaviour.cs.meta rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/EditorPlaneBehaviour.cs.meta diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/IPlaneBehaviour.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/IPlaneBehaviour.cs similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/IPlaneBehaviour.cs rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/IPlaneBehaviour.cs diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/IPlaneBehaviour.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/IPlaneBehaviour.cs.meta similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/IPlaneBehaviour.cs.meta rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/IPlaneBehaviour.cs.meta diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/MRTKPlaneBehavior.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/MRTKPlaneBehavior.cs similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/MRTKPlaneBehavior.cs rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/MRTKPlaneBehavior.cs diff --git a/Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/MRTKPlaneBehavior.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/MRTKPlaneBehavior.cs.meta similarity index 100% rename from Assets/MirageXR/Common/Scripts/Managers/FloorManager/Plane/MRTKPlaneBehavior.cs.meta rename to Assets/MirageXR/Common/Scripts/Managers/PlaneManager/Plane/MRTKPlaneBehavior.cs.meta diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/PlaneManagerWrapper.cs b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/PlaneManagerWrapper.cs new file mode 100644 index 000000000..a9911cf8c --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/PlaneManagerWrapper.cs @@ -0,0 +1,145 @@ +using System; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.Events; + +public class UnityEventPlaneIdVector3 : UnityEvent { } + +public struct PlaneId +{ + public static PlaneId InvalidId = new PlaneId(0, 0); + + public ulong subId1; + public ulong subId2; + + public PlaneId(ulong subId1, ulong subId2) + { + this.subId1 = subId1; + this.subId2 = subId2; + } + + public static bool operator ==(PlaneId lhs, PlaneId rhs) => lhs.subId1 == rhs.subId1 && lhs.subId2 == rhs.subId2; + + public static bool operator !=(PlaneId lhs, PlaneId rhs) => lhs.subId1 != rhs.subId1 || lhs.subId2 != rhs.subId2; +} + +public class PlaneManagerWrapper : MonoBehaviour +{ + [Serializable] + public enum ForceManagerType + { + Default, + Editor, + ARFoundation, + MRTK, + } + + [SerializeField] private ForceManagerType _forceManagerType = ForceManagerType.Default; + [SerializeField] private GameObject _prefabARFoundationPlane; + [SerializeField] private GameObject _prefabEditorPlane; + [SerializeField] private UnityEvent _onDetectionEnabled = new UnityEvent(); + [SerializeField] private UnityEvent _onDetectionDisabled = new UnityEvent(); + + public UnityEventPlaneIdVector3 onPlaneClicked => _manager.onPlaneClicked; + + public UnityEvent onDetectionEnabled => _onDetectionEnabled; + + public UnityEvent onDetectionDisabled => _onDetectionDisabled; + + private IPlaneManager _manager; + + public async Task InitializationAsync() + { + _manager = CreateManager(); + + if (_manager == null) + { + return; + } + + try + { + var result = await _manager.InitializationAsync(); + if (!result) + { + Debug.Log("FloorManagerWrapper: unable to initialize"); + } + } + catch (Exception e) + { + Debug.LogError(e); + } + } + + public Task ResetAsync() + { + return _manager.ResetAsync(); + } + + public void EnablePlanes() + { + _onDetectionEnabled.Invoke(); + _manager.EnablePlanes(); + } + + public void DisablePlanes() + { + _onDetectionDisabled.Invoke(); + _manager.DisablePlanes(); + } + + public void SelectPlane(PlaneId planeId) + { + _manager.SelectPlane(planeId); + } + + public GameObject GetPlane(PlaneId planeId) + { + return _manager.GetPlane(planeId); + } + + public void UpdatePlanes() + { + _manager.UpdatePlanes(); + } + + public void Dispose() + { + _manager?.Dispose(); + } + + private IPlaneManager CreateManager() + { + switch (_forceManagerType) + { + case ForceManagerType.Default: + return CreateDefaultManager(); + case ForceManagerType.Editor: + var managerEditor = gameObject.AddComponent(); + managerEditor.prefabPlane = _prefabEditorPlane; + return managerEditor; + case ForceManagerType.ARFoundation: + var managerARFoundation = gameObject.AddComponent(); + managerARFoundation.prefabPlane = _prefabARFoundationPlane; + return managerARFoundation; + case ForceManagerType.MRTK: + return gameObject.AddComponent(); + default: + throw new ArgumentOutOfRangeException(); + } + } + + private IPlaneManager CreateDefaultManager() + { +#if UNITY_EDITOR + var manager = gameObject.AddComponent(); + manager.prefabPlane = _prefabEditorPlane; +#elif UNITY_IOS || UNITY_ANDROID + var manager = gameObject.AddComponent(); + manager.prefabPlane = _prefabARFoundationPlane; +#else + var manager = gameObject.AddComponent(); +#endif + return manager; + } +} diff --git a/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/PlaneManagerWrapper.cs.meta b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/PlaneManagerWrapper.cs.meta new file mode 100644 index 000000000..1c38076f5 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Managers/PlaneManager/PlaneManagerWrapper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 64ef31f9a2613894d8d6b9efcfdaa9bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/PointCloudManager.cs b/Assets/MirageXR/Common/Scripts/Managers/PointCloudManager.cs index 96e67d0d5..fe3e3a018 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/PointCloudManager.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/PointCloudManager.cs @@ -13,7 +13,7 @@ public class PointCloudManager : MonoBehaviour public async Task InitializationAsync() { #if !UNITY_ANDROID && !UNITY_IOS - return false; + return true; #endif var mainCamera = Camera.main; @@ -44,6 +44,9 @@ public void Unsubscribe() public async Task ResetAsync() { +#if !UNITY_ANDROID && !UNITY_IOS + return true; +#endif if (!_arSession) { Debug.LogError("ARSession is null"); diff --git a/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/CalibrationFlowView.prefab b/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/CalibrationFlowView.prefab index 85faef475..16bb7970b 100644 --- a/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/CalibrationFlowView.prefab +++ b/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/CalibrationFlowView.prefab @@ -334,6 +334,9 @@ Transform: - {fileID: 7073893414962230977} - {fileID: 6644601170306863792} - {fileID: 2994726590303335292} + - {fileID: 1359621632083188875} + - {fileID: 3951283355267910764} + - {fileID: 3139389769650969989} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -353,6 +356,9 @@ MonoBehaviour: _textMain: {fileID: 8510865897502083961} _btnClose: {fileID: 7744568892636938531} _followMeToggle: {fileID: 7183520233392892914} + _btnImageTarget: {fileID: 4660354648548939246} + _btnManualPlacement: {fileID: 7252897877271282953} + _btnApply: {fileID: 8783115673243112672} --- !u!114 &7306334447335054152 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3194,3 +3200,279 @@ MonoBehaviour: cellWidth: 0.032 cellHeight: 0.032 assetVersion: 1 +--- !u!1001 &6431684572768324936 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 8748480417262091103} + m_Modifications: + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.x + value: -0.0064 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.y + value: -0.0672 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8281352551353758814, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_Name + value: ImageTarget + objectReference: {fileID: 0} + - target: {fileID: 8519859843598265470, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_text + value: Image Target + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1b983298ccbbf88408d16d24f08983b9, type: 3} +--- !u!4 &1359621632083188875 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + m_PrefabInstance: {fileID: 6431684572768324936} + m_PrefabAsset: {fileID: 0} +--- !u!114 &4660354648548939246 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1868159138348849318, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + m_PrefabInstance: {fileID: 6431684572768324936} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &6921731351921855558 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 8748480417262091103} + m_Modifications: + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.0507 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.y + value: -0.0672 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8281352551353758814, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_Name + value: Apply + objectReference: {fileID: 0} + - target: {fileID: 8519859843598265470, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_text + value: Apply + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1b983298ccbbf88408d16d24f08983b9, type: 3} +--- !u!4 &3139389769650969989 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + m_PrefabInstance: {fileID: 6921731351921855558} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8783115673243112672 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1868159138348849318, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + m_PrefabInstance: {fileID: 6921731351921855558} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &9028152543676358063 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 8748480417262091103} + m_Modifications: + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.111 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.y + value: -0.0672 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8281352551353758814, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_Name + value: ManualPlacement + objectReference: {fileID: 0} + - target: {fileID: 8519859843598265470, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + propertyPath: m_text + value: Manual Placement + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1b983298ccbbf88408d16d24f08983b9, type: 3} +--- !u!4 &3951283355267910764 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 5449275977911112131, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + m_PrefabInstance: {fileID: 9028152543676358063} + m_PrefabAsset: {fileID: 0} +--- !u!114 &7252897877271282953 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1868159138348849318, guid: 1b983298ccbbf88408d16d24f08983b9, + type: 3} + m_PrefabInstance: {fileID: 9028152543676358063} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/PressableButtonHoloLens.prefab b/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/PressableButtonHoloLens.prefab new file mode 100644 index 000000000..cc63f4bf4 --- /dev/null +++ b/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/PressableButtonHoloLens.prefab @@ -0,0 +1,1473 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1310109838754621168 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1253098431961010668} + - component: {fileID: 1757220743199146542} + - component: {fileID: 2309204700740401516} + m_Layer: 5 + m_Name: UIButtonSquareIcon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1253098431961010668 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1310109838754621168} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.03254, y: -0.0013000031, z: 0} + m_LocalScale: {x: 0.32, y: 0.32, z: 0.32} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8123102663236222971} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1757220743199146542 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1310109838754621168} + m_Mesh: {fileID: 4300010, guid: b566bbce04d66f4428421e81a3af0299, type: 3} +--- !u!23 &2309204700740401516 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1310109838754621168} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: fa419ab56051229449e3b813df8f295f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &2297886357308335354 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2490486247577123619} + - component: {fileID: 787638784683624286} + - component: {fileID: 7625071641767690552} + m_Layer: 0 + m_Name: Quad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2490486247577123619 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2297886357308335354} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.032, y: 0.032, z: 0.01} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6961430240520405532} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &787638784683624286 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2297886357308335354} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &7625071641767690552 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2297886357308335354} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 2 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ec72a3a105768f746b556a8dfdae61a8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &3366213308242862671 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3480306697268503790} + - component: {fileID: 7436425601534016348} + - component: {fileID: 2185004575710173285} + - component: {fileID: 4894309119219143628} + m_Layer: 0 + m_Name: FrontPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3480306697268503790 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3366213308242862671} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.00012, y: 0, z: -0.008} + m_LocalScale: {x: 0.095602654, y: 0.032, z: 0.016} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1864712331932279935} + m_Father: {fileID: 8304619711643018459} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7436425601534016348 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3366213308242862671} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2185004575710173285 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3366213308242862671} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 38a587e9218b3284485088c9925af61f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &4894309119219143628 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3366213308242862671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36065390e01a3cd40b87e4bf4acd02f9, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &4245491549428575654 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8123102663236222971} + m_Layer: 0 + m_Name: IconAndText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8123102663236222971 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4245491549428575654} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3888691783600054128} + - {fileID: 1253098431961010668} + - {fileID: 4120429594752477938} + - {fileID: 6499209033166980819} + m_Father: {fileID: 5449275977911112131} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4760642870628670761 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4120429594752477938} + - component: {fileID: 7420664078190759754} + - component: {fileID: 7407004449813134492} + - component: {fileID: 2732091886445242736} + - component: {fileID: 4650609329532367258} + m_Layer: 0 + m_Name: UIButtonCharIcon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &4120429594752477938 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4760642870628670761} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8123102663236222971} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0.015, y: 0.015} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!23 &7420664078190759754 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4760642870628670761} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &7407004449813134492 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4760642870628670761} + m_Mesh: {fileID: 0} +--- !u!222 &2732091886445242736 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4760642870628670761} + m_CullTransparentMesh: 0 +--- !u!114 &4650609329532367258 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4760642870628670761} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\uEBD2" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 0} + m_sharedMaterial: {fileID: 0} + 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: 0 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 0.115 + m_fontSizeBase: 0.1 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 544 + 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: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + 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 + _SortingLayer: 0 + _SortingLayerID: 0 + _SortingOrder: 0 + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 7420664078190759754} + m_maskType: 0 +--- !u!1 &7224097510907511736 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6499209033166980819} + - component: {fileID: 284455791986091020} + m_Layer: 0 + m_Name: UIButtonSpriteIcon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &6499209033166980819 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7224097510907511736} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.0025, y: 0.0025, z: 0.0025} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8123102663236222971} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &284455791986091020 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7224097510907511736} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 6a6e5414f9c66aa4a8c85eb38302a558, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.56, y: 2.56} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 0 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &7624493352764576763 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2563655848780503734} + m_Layer: 0 + m_Name: ButtonContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2563655848780503734 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7624493352764576763} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5449275977911112131} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7875280765091572056 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6961430240520405532} + m_Layer: 0 + m_Name: BackPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6961430240520405532 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7875280765091572056} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.008} + m_LocalScale: {x: 3, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2490486247577123619} + m_Father: {fileID: 5449275977911112131} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &7966922691126100051 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3888691783600054128} + - component: {fileID: 2091639611609310286} + - component: {fileID: 2208643051837570076} + - component: {fileID: 8519859843598265470} + m_Layer: 0 + m_Name: TextMeshPro + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3888691783600054128 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7966922691126100051} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8123102663236222971} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -0.00077, y: -0.00199} + m_SizeDelta: {x: 0.032, y: 0.01} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!23 &2091639611609310286 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7966922691126100051} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!222 &2208643051837570076 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7966922691126100051} + m_CullTransparentMesh: 0 +--- !u!114 &8519859843598265470 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7966922691126100051} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Button Title Label + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 6a84f857bec7e7345843ae29404c57ce, type: 2} + m_sharedMaterial: {fileID: 21202819797275496, guid: 6a84f857bec7e7345843ae29404c57ce, + 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: 0.06 + m_fontSizeBase: 0.06 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + 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.029919242, y: -0.011272951, z: -0.031214677, w: -0.0073364154} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + _SortingLayer: 0 + _SortingLayerID: 0 + _SortingOrder: 0 + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 2091639611609310286} + m_maskType: 0 +--- !u!1 &8281352551353758814 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5449275977911112131} + - component: {fileID: 8804999820575435379} + - component: {fileID: 3337840731744669813} + - component: {fileID: 800312013130674667} + - component: {fileID: 1868159138348849318} + - component: {fileID: 8095471043979754764} + - component: {fileID: 2919939331566711559} + - component: {fileID: 5257416252068326390} + m_Layer: 0 + m_Name: PressableButtonHoloLens + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5449275977911112131 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2563655848780503734} + - {fileID: 8304619711643018459} + - {fileID: 6961430240520405532} + - {fileID: 8123102663236222971} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &8804999820575435379 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.096, y: 0.032, z: 0.016} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &3337840731744669813 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f98e7663599230e419addf153615c144, type: 3} + m_Name: + m_EditorClassIdentifier: + movingButtonVisuals: {fileID: 7624493352764576763} + distanceSpaceMode: 1 + startPushDistance: -0.008 + maxPushDistance: 0.006 + pressDistance: 0.0005 + releaseDistanceDelta: 0.002 + returnSpeed: 25 + releaseOnTouchEnd: 1 + enforceFrontPush: 1 + TouchBegin: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 800312013130674667} + m_TargetAssemblyTypeName: + m_MethodName: OnHandPressTouched + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + TouchEnd: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 800312013130674667} + m_TargetAssemblyTypeName: + m_MethodName: OnHandPressUntouched + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + ButtonPressed: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 800312013130674667} + m_TargetAssemblyTypeName: + m_MethodName: OnHandPressTriggered + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 8095471043979754764} + m_TargetAssemblyTypeName: + m_MethodName: PlayOneShot + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 8300000, guid: 291bf9326e517b0489c2ee53d0a6a63f, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.AudioClip, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + ButtonReleased: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 800312013130674667} + m_TargetAssemblyTypeName: + m_MethodName: OnHandPressCompleted + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 8095471043979754764} + m_TargetAssemblyTypeName: + m_MethodName: PlayOneShot + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 8300000, guid: 40ae713ddf420714bbc1a3b5c3f2eac1, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.AudioClip, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + movingButtonIconText: {fileID: 4245491549428575654} + compressableButtonVisuals: {fileID: 8400109620964342163} + minCompressPercentage: 0.25 + highlightPlate: {fileID: 619381327266222009} + highlightPlateAnimationTime: 0.25 +--- !u!114 &800312013130674667 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 881d1ff8f009f5148b9f192e6ba31223, type: 3} + m_Name: + m_EditorClassIdentifier: + routingTarget: {fileID: 1868159138348849318} + InteractableOnClick: 1 +--- !u!114 &1868159138348849318 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1410eac1ae94b4d4492a09cc368e152c, type: 3} + m_Name: + m_EditorClassIdentifier: + states: {fileID: 11400000, guid: e51893c8eb7938e4ba43985af43c0f72, type: 2} + InputActionId: 0 + isGlobal: 0 + Dimensions: 1 + dimensionIndex: 0 + startDimensionIndex: 0 + CanSelect: 0 + CanDeselect: 0 + voiceCommand: + voiceRequiresFocus: 1 + profiles: + - Target: {fileID: 3366213308242862671} + Themes: + - {fileID: 11400000, guid: 8f8cfb3041153fa45bccb6d664a563ec, type: 2} + - Target: {fileID: 1310109838754621168} + Themes: + - {fileID: 11400000, guid: 087b16002c2b0b445baa3ed3beae44a9, type: 2} + OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: + m_MethodName: Increment + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + Events: + - Event: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3337840731744669813} + m_TargetAssemblyTypeName: + m_MethodName: AnimateInHighlightPlate + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + ClassName: InteractableOnFocusReceiver + AssemblyQualifiedName: Microsoft.MixedReality.Toolkit.UI.InteractableOnFocusReceiver, + Microsoft.MixedReality.Toolkit.SDK + Settings: + - Type: 18 + Label: On Focus Off + Name: OnFocusOff + Tooltip: Focus has left the object + IntValue: 0 + StringValue: + FloatValue: 0 + BoolValue: 0 + GameObjectValue: {fileID: 0} + ScriptableObjectValue: {fileID: 0} + ObjectValue: {fileID: 0} + MaterialValue: {fileID: 0} + TextureValue: {fileID: 0} + ColorValue: {r: 0, g: 0, b: 0, a: 0} + Vector2Value: {x: 0, y: 0} + Vector3Value: {x: 0, y: 0, z: 0} + Vector4Value: {x: 0, y: 0, z: 0, w: 0} + CurveValue: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 0 + m_PostInfinity: 0 + m_RotationOrder: 0 + AudioClipValue: {fileID: 0} + QuaternionValue: {x: 0, y: 0, z: 0, w: 0} + EventValue: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3337840731744669813} + m_TargetAssemblyTypeName: + m_MethodName: AnimateOutHighlightPlate + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + Options: [] + - Event: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 8095471043979754764} + m_TargetAssemblyTypeName: + m_MethodName: PlayOneShot + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 8300000, guid: 291bf9326e517b0489c2ee53d0a6a63f, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.AudioClip, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + ClassName: InteractableOnPressReceiver + AssemblyQualifiedName: Microsoft.MixedReality.Toolkit.UI.InteractableOnPressReceiver, + Microsoft.MixedReality.Toolkit.SDK + Settings: + - Type: 18 + Label: On Release + Name: OnRelease + Tooltip: The button is released + IntValue: 0 + StringValue: + FloatValue: 0 + BoolValue: 0 + GameObjectValue: {fileID: 0} + ScriptableObjectValue: {fileID: 0} + ObjectValue: {fileID: 0} + MaterialValue: {fileID: 0} + TextureValue: {fileID: 0} + ColorValue: {r: 0, g: 0, b: 0, a: 0} + Vector2Value: {x: 0, y: 0} + Vector3Value: {x: 0, y: 0, z: 0} + Vector4Value: {x: 0, y: 0, z: 0, w: 0} + CurveValue: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 0 + m_PostInfinity: 0 + m_RotationOrder: 0 + AudioClipValue: {fileID: 0} + QuaternionValue: {x: 0, y: 0, z: 0, w: 0} + EventValue: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 8095471043979754764} + m_TargetAssemblyTypeName: + m_MethodName: PlayOneShot + m_Mode: 2 + m_Arguments: + m_ObjectArgument: {fileID: 8300000, guid: 40ae713ddf420714bbc1a3b5c3f2eac1, + type: 3} + m_ObjectArgumentAssemblyTypeName: UnityEngine.AudioClip, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + Options: [] + - Type: 5 + Label: Interaction Filter + Name: InteractionFilter + Tooltip: Specify whether press event is for near or far interaction + IntValue: 2 + StringValue: + FloatValue: 0 + BoolValue: 0 + GameObjectValue: {fileID: 0} + ScriptableObjectValue: {fileID: 0} + ObjectValue: {fileID: 0} + MaterialValue: {fileID: 0} + TextureValue: {fileID: 0} + ColorValue: {r: 0, g: 0, b: 0, a: 0} + Vector2Value: {x: 0, y: 0} + Vector3Value: {x: 0, y: 0, z: 0} + Vector4Value: {x: 0, y: 0, z: 0, w: 0} + CurveValue: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 0 + m_PostInfinity: 0 + m_RotationOrder: 0 + AudioClipValue: {fileID: 0} + QuaternionValue: {x: 0, y: 0, z: 0, w: 0} + EventValue: + m_PersistentCalls: + m_Calls: [] + Options: + - Near and Far + - Near Only + - Far Only + resetOnDestroy: 0 + enabledOnStart: 1 +--- !u!82 &8095471043979754764 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!114 &2919939331566711559 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98c748f3768ab714a8449b60fb9edc5c, type: 3} + m_Name: + m_EditorClassIdentifier: + eventsToReceive: 0 + debounceThreshold: 0.01 + localForward: {x: 0, y: 0, z: -1} + localUp: {x: 0, y: 1, z: 0} + localCenter: {x: 0, y: 0, z: -0.008} + bounds: {x: 0.09607224, y: 0.032} + touchableCollider: {fileID: 8804999820575435379} +--- !u!114 &5257416252068326390 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8281352551353758814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2cf098d972aeb8b4daa70b00381af006, type: 3} + m_Name: + m_EditorClassIdentifier: + mainLabelText: {fileID: 8519859843598265470} + interactable: {fileID: 1868159138348849318} + seeItSayItLabel: {fileID: 0} + seeItSayItLabelText: {fileID: 0} + iconStyle: 3 + iconCharLabel: {fileID: 4650609329532367258} + iconCharFont: {fileID: 0} + iconChar: 0 + iconSpriteRenderer: {fileID: 284455791986091020} + iconSprite: {fileID: 21300000, guid: 20f25674b9512834f88938d45ed495d7, type: 3} + iconQuadRenderer: {fileID: 2309204700740401516} + iconQuadTextureNameID: _MainTex + iconQuadTexture: {fileID: 2800000, guid: bb1b4a9241fba2042a81428e917afd5d, type: 3} + defaultButtonQuadMaterial: {fileID: 2100000, guid: fa419ab56051229449e3b813df8f295f, + type: 2} + iconSet: {fileID: 11400000, guid: 8b386ef895f7c924f8c4b03d1d3ed683, type: 2} + defaultIconSet: {fileID: 11400000, guid: 8b386ef895f7c924f8c4b03d1d3ed683, type: 2} +--- !u!1 &8307668805418362687 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1864712331932279935} + - component: {fileID: 6689142061153183801} + - component: {fileID: 619381327266222009} + - component: {fileID: 6935545074092164206} + m_Layer: 0 + m_Name: HighlightPlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1864712331932279935 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8307668805418362687} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3480306697268503790} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &6689142061153183801 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8307668805418362687} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &619381327266222009 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8307668805418362687} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 2 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 329cdefad4cf0f14e9b6767d0af094b0, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &6935545074092164206 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8307668805418362687} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36065390e01a3cd40b87e4bf4acd02f9, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &8400109620964342163 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8304619711643018459} + m_Layer: 0 + m_Name: CompressableButtonVisuals + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8304619711643018459 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8400109620964342163} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.008} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3480306697268503790} + m_Father: {fileID: 5449275977911112131} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/PressableButtonHoloLens.prefab.meta b/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/PressableButtonHoloLens.prefab.meta new file mode 100644 index 000000000..ba38e8e20 --- /dev/null +++ b/Assets/MirageXR/Player/Resources/Prefabs/UI/Hololens/PressableButtonHoloLens.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1b983298ccbbf88408d16d24f08983b9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Player/Scripts/Character Aug/FakeFloor.cs b/Assets/MirageXR/Player/Scripts/Character Aug/FakeFloor.cs index 7665d2099..6b370127b 100644 --- a/Assets/MirageXR/Player/Scripts/Character Aug/FakeFloor.cs +++ b/Assets/MirageXR/Player/Scripts/Character Aug/FakeFloor.cs @@ -7,19 +7,22 @@ public class FakeFloor : MonoBehaviour { private const float OFFSET = -0.05f; + private static PlaneManagerWrapper planeManager => RootObject.Instance.planeManager; + private static FloorManagerWrapper floorManager => RootObject.Instance.floorManager; + private void Start() { gameObject.GetComponent().enabled = true; - floorManager.onDetectionEnabled.AddListener(OnDetectionEnabled); - floorManager.onDetectionDisabled.AddListener(OnDetectionDisabled); + planeManager.onDetectionEnabled.AddListener(OnDetectionEnabled); + planeManager.onDetectionDisabled.AddListener(OnDetectionDisabled); } private void OnDestroy() { - floorManager.onDetectionEnabled.RemoveListener(OnDetectionEnabled); - floorManager.onDetectionDisabled.RemoveListener(OnDetectionDisabled); + planeManager.onDetectionEnabled.RemoveListener(OnDetectionEnabled); + planeManager.onDetectionDisabled.RemoveListener(OnDetectionDisabled); } private void Update() diff --git a/Assets/MirageXR/Player/Scripts/Managers/UiManager.cs b/Assets/MirageXR/Player/Scripts/Managers/UiManager.cs index c97e1d143..ae47867a0 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/UiManager.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/UiManager.cs @@ -274,7 +274,7 @@ private async void ShowActivityStart() if (PlatformManager.Instance.WorldSpaceUi) { - RootObject.Instance.calibrationManager.EnableCalibration(); + RootObject.Instance.calibrationManager.EnableCalibration(true); } // Hile loading text diff --git a/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceManager.cs b/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceManager.cs index f8e3c5a77..3bced5727 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceManager.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceManager.cs @@ -266,7 +266,7 @@ public void DeletePlace(string id) /// performs changes to the model using the WorkplaceManager's functionality. /// /// Origin transform from the calibration target. - public async Task CalibrateWorkplace(Transform origin, bool isNewPosition = false) + public async Task CalibrateWorkplace(bool isNewPosition = false) { await activityManager.ActivateFirstAction(); diff --git a/Assets/MirageXR/Player/Scripts/RootObject.cs b/Assets/MirageXR/Player/Scripts/RootObject.cs index 97f89819e..d9cae70ff 100644 --- a/Assets/MirageXR/Player/Scripts/RootObject.cs +++ b/Assets/MirageXR/Player/Scripts/RootObject.cs @@ -12,6 +12,7 @@ public class RootObject : MonoBehaviour [SerializeField] private ImageTargetManagerWrapper _imageTargetManager; [SerializeField] private CalibrationManager _calibrationManager; [SerializeField] private FloorManagerWrapper _floorManager; + [SerializeField] private PlaneManagerWrapper _planeManager; [SerializeField] private PointCloudManager _pointCloudManager; [SerializeField] private BrandManager _brandManager; [SerializeField] private GridManager _gridManager; @@ -28,6 +29,8 @@ public class RootObject : MonoBehaviour public FloorManagerWrapper floorManager => _floorManager; + public PlaneManagerWrapper planeManager => _planeManager; + public BrandManager brandManager => _brandManager; public GridManager gridManager => _gridManager; @@ -98,9 +101,8 @@ private async Task Initialization() // TODO: create base Manager class await _imageTargetManager.InitializationAsync(); await _floorManager.InitializationAsync(); await _calibrationManager.InitializationAsync(); -#if UNITY_IOS || UNITY_ANDROID || UNITY_EDITOR await _pointCloudManager.InitializationAsync(); -#endif + await _planeManager.InitializationAsync(); _gridManager.Initialization(); @@ -124,18 +126,17 @@ private void ResetManagers() private async Task ResetManagersAsync() { await _floorManager.ResetAsync(); -#if UNITY_IOS || UNITY_ANDROID || UNITY_EDITOR + await planeManager.ResetAsync(); await _pointCloudManager.ResetAsync(); -#endif await _imageTargetManager.ResetAsync(); } private void OnDestroy() { - _floorManager.Dispose(); _activityManager.Unsubscribe(); _pointCloudManager.Unsubscribe(); _activityManager.OnDestroy(); + _planeManager.Dispose(); } } } \ No newline at end of file diff --git a/Assets/MirageXR/Tests/NewUI/CalibrationView.cs b/Assets/MirageXR/Tests/NewUI/CalibrationView.cs index 53c160241..233579a9a 100644 --- a/Assets/MirageXR/Tests/NewUI/CalibrationView.cs +++ b/Assets/MirageXR/Tests/NewUI/CalibrationView.cs @@ -13,11 +13,16 @@ public class CalibrationView : PopupBase private static FloorManagerWrapper floorManager => RootObject.Instance.floorManager; + private static PlaneManagerWrapper planeManager => RootObject.Instance.planeManager; + private static GridManager gridManager => RootObject.Instance.gridManager; private string CALIBRATION_TEXT = "Calibration"; + private string SELECT_CALIBRATION_TEXT = "Select calibration type"; private string NEW_POSITION_TEXT = "New position"; + private string FLOOR_DETECTION_TEXT = "Floor detection"; private string HINT_MARKER_TEXT = "Look at the calibration image on a printed paper or a screen to calibrate the activity."; + private string HINT_PLACEMENT_TEXT = "Tap on the plane to place the anchor."; private string HINT_FLOOR_TEXT = "Look at the floor while moving your device. As a plane appears, click on it."; private int DELAY_TIME = 500; private int CLOSE_TIME = 1000; @@ -31,22 +36,42 @@ public class CalibrationView : PopupBase [SerializeField] private TMP_Text _textHint; [SerializeField] private GameObject _calibrationAnimation; [SerializeField] private GameObject _floorDetectionAnimation; + [SerializeField] private GameObject _planeAnimation; + [SerializeField] private GameObject _panelSelectType; + [SerializeField] private Button _btnImageTarget; + [SerializeField] private Button _btnManualPlacement; + [SerializeField] private Toggle _toggleResetPosition; [SerializeField] private Button _btnBack; + [SerializeField] private Button _btnApply; [SerializeField] private Color _colorRed; [SerializeField] private Color _colorBlue; private Action _showBaseView; private Action _hideBaseView; private bool _isNewPosition; + private bool _isFloorOnly; private Tweener _tweenerCalibration; private Sequence _tweenerDetection; + private Pose _startPose; public override void Initialization(Action onClose, params object[] args) { base.Initialization(onClose, args); _canBeClosedByOutTap = false; _showBackground = false; - _btnBack.onClick.AddListener(Close); + + _calibrationAnimation.SetActive(false); + _floorDetectionAnimation.SetActive(false); + _panelSelectType.SetActive(false); + _planeAnimation.SetActive(false); + + _btnBack.onClick.AddListener(OnCloseButtonPressed); + _btnApply.onClick.AddListener(OnApplyButtonPressed); + _btnImageTarget.onClick.AddListener(OnButtonImageTargetClicked); + _btnManualPlacement.onClick.AddListener(OnButtonManualPlacementClicked); + _toggleResetPosition.isOn = _isNewPosition; + _toggleResetPosition.onValueChanged.AddListener(OnToggleResetPositionValueChanged); + _btnApply.gameObject.SetActive(false); ResetCalibration(); @@ -58,12 +83,35 @@ public override void Initialization(Action onClose, params object[] a _hideBaseView?.Invoke(); - StartFloorDetectionAsync().AsAsyncVoid(); + _startPose = calibrationManager.GetAnchorPositionAsync(); + + if (_isFloorOnly || !floorManager.isFloorDetected) + { + StartFloorDetectionAsync().AsAsyncVoid(); + } + else + { + ShowSelectTypePanel(); + } + } + + private void OnButtonImageTargetClicked() + { + StartCalibration(); + } + + private void OnButtonManualPlacementClicked() + { + StartPlaceCalibrationAsync().AsAsyncVoid(); + } + + private void OnToggleResetPositionValueChanged(bool value) + { + _isNewPosition = value; } private async Task StartFloorDetectionAsync() { - _calibrationAnimation.SetActive(false); _floorDetectionAnimation.SetActive(true); _imageDetectionAnimation.eulerAngles = new Vector3(0, 0, -10); @@ -73,30 +121,76 @@ private async Task StartFloorDetectionAsync() _tweenerDetection.SetLoops(-1); _tweenerDetection.SetEase(Ease.Linear); + _textTop.text = FLOOR_DETECTION_TEXT; _textHint.text = HINT_FLOOR_TEXT; await Task.Delay(DELAY_TIME); - floorManager.EnableFloorDetection(OnFloorDetected); + planeManager.EnablePlanes(); + planeManager.onPlaneClicked.AddListener(OnFloorDetected); } - private void OnFloorDetected() + private void OnFloorDetected(PlaneId planeId, Vector3 position) { - OnFloorDetectedAsync().AsAsyncVoid(); + planeManager.onPlaneClicked.RemoveListener(OnFloorDetected); + OnFloorDetectedAsync(planeId, position).AsAsyncVoid(); } - private async Task OnFloorDetectedAsync() + private async Task OnFloorDetectedAsync(PlaneId planeId, Vector3 position) { + floorManager.SetFloor(planeId, position); _floorDetectionAnimation.SetActive(false); _tweenerDetection?.Kill(); await Task.Delay(DELAY_TIME); - floorManager.DisableFloorDetection(); - StartCalibration(); + planeManager.DisablePlanes(); + + if (_isFloorOnly) + { + Close(); + } + else + { + ShowSelectTypePanel(); + } + } + + private void ShowSelectTypePanel() + { + _footer.SetActive(false); + _textTop.text = SELECT_CALIBRATION_TEXT; + _panelSelectType.SetActive(true); + } + + private async Task StartPlaceCalibrationAsync() + { + await Task.Delay(DELAY_TIME); + _textTop.text = _isNewPosition ? NEW_POSITION_TEXT : CALIBRATION_TEXT; + _footer.gameObject.SetActive(true); + _panelSelectType.SetActive(false); + _planeAnimation.SetActive(true); + planeManager.EnablePlanes(); + _textHint.text = HINT_PLACEMENT_TEXT; + planeManager.onPlaneClicked.AddListener(OnCalibrationPlaceDetected); + } + + private void OnCalibrationPlaceDetected(PlaneId planeId, Vector3 position) + { + _btnApply.gameObject.SetActive(true); + + var cameraPosition = Camera.main.transform.position; + var direction = cameraPosition - position; + direction.Normalize(); + var rotation = Quaternion.LookRotation(direction, Vector3.up); + rotation.x = 0; + rotation.z = 0; + calibrationManager.SetAnchorPositionAsync(new Pose(position, rotation), _isNewPosition); } private void StartCalibration() { + _textTop.text = _isNewPosition ? NEW_POSITION_TEXT : CALIBRATION_TEXT; + _footer.gameObject.SetActive(true); + _panelSelectType.SetActive(false); _calibrationAnimation.SetActive(true); - _floorDetectionAnimation.SetActive(false); _textHint.text = HINT_MARKER_TEXT; calibrationManager.EnableCalibration(_isNewPosition); } @@ -149,14 +243,34 @@ private void ResetCalibration() _tweenerDetection?.Kill(); } + public void OnCloseButtonPressed() + { + var pose = calibrationManager.GetAnchorPositionAsync(); + if (pose != _startPose) + { + calibrationManager.SetAnchorPositionAsync(_startPose, false); + } + + Close(); + } + public override void Close() { + planeManager.onPlaneClicked.RemoveListener(OnCalibrationPlaceDetected); calibrationManager.DisableCalibration(); - floorManager.DisableFloorDetection(); + planeManager.DisablePlanes(); _showBaseView?.Invoke(); base.Close(); } + private void OnApplyButtonPressed() + { + _btnApply.gameObject.SetActive(false); + planeManager.onPlaneClicked.RemoveListener(OnCalibrationPlaceDetected); + planeManager.DisablePlanes(); + OnCalibrationFinishedAsync(); + } + protected override bool TryToGetArguments(params object[] args) { try @@ -164,6 +278,7 @@ protected override bool TryToGetArguments(params object[] args) _hideBaseView = (Action)args[0]; _showBaseView = (Action)args[1]; _isNewPosition = (bool)args[2]; + _isFloorOnly = (bool)args[3]; return true; } catch (Exception) diff --git a/Assets/MirageXR/Tests/NewUI/Prefabs/CalibrationView.prefab b/Assets/MirageXR/Tests/NewUI/Prefabs/CalibrationView.prefab index d0dd22bf3..eb4609cc9 100644 --- a/Assets/MirageXR/Tests/NewUI/Prefabs/CalibrationView.prefab +++ b/Assets/MirageXR/Tests/NewUI/Prefabs/CalibrationView.prefab @@ -32,8 +32,10 @@ RectTransform: m_Children: - {fileID: 4749296874375559124} - {fileID: 863870520349413335} + - {fileID: 5404881643567540767} - {fileID: 2554144696742431124} - {fileID: 2888996296423929090} + - {fileID: 8619633074232835236} - {fileID: 6645995267804941559} m_Father: {fileID: 0} m_RootOrder: 0 @@ -72,7 +74,13 @@ MonoBehaviour: _textHint: {fileID: 1985377025601378683} _calibrationAnimation: {fileID: 4006521424335234862} _floorDetectionAnimation: {fileID: 2271401563421384518} + _planeAnimation: {fileID: 4928054870419446239} + _panelSelectType: {fileID: 6281083909385562894} + _btnImageTarget: {fileID: 1009077576210825545} + _btnManualPlacement: {fileID: 6611600583773822877} + _toggleResetPosition: {fileID: 3445971308436304068} _btnBack: {fileID: 7088709078163814159} + _btnApply: {fileID: 1720353505527751642} _colorRed: {r: 1, g: 0.5254902, b: 0.49803925, a: 1} _colorBlue: {r: 0.21568629, g: 0.7607844, b: 0.8470589, a: 1} --- !u!1 &135046269584513724 @@ -206,7 +214,7 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 35.95 + m_fontSize: 40 m_fontSizeBase: 36 m_fontWeight: 400 m_enableAutoSizing: 1 @@ -603,7 +611,7 @@ RectTransform: m_Children: - {fileID: 3833644540067749344} m_Father: {fileID: 123955173422469536} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -627,7 +635,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &6645995267804941559 RectTransform: m_ObjectHideFlags: 0 @@ -643,7 +651,7 @@ RectTransform: - {fileID: 7219335813428696542} - {fileID: 6501703555646064231} m_Father: {fileID: 123955173422469536} - m_RootOrder: 4 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -794,7 +802,7 @@ RectTransform: m_Children: - {fileID: 2449899286741477452} m_Father: {fileID: 123955173422469536} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -1001,6 +1009,43 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4928054870419446239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8619633074232835236} + m_Layer: 5 + m_Name: PlaneAnimation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8619633074232835236 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4928054870419446239} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1720353505527751643} + m_Father: {fileID: 123955173422469536} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &5075417605657471002 GameObject: m_ObjectHideFlags: 0 @@ -1077,150 +1122,825 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1001 &6057719620819343519 +--- !u!1 &6281083909385562894 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5404881643567540767} + - component: {fileID: 8165542902671245950} + m_Layer: 5 + m_Name: PlaneSelectType + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5404881643567540767 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6281083909385562894} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5461992444048277342} + - {fileID: 1009077576210825544} + - {fileID: 6611600583773822876} + m_Father: {fileID: 123955173422469536} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 25} + m_SizeDelta: {x: 0, y: 100} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &8165542902671245950 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6281083909385562894} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 50 + m_Right: 50 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 50 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 1 + m_ChildScaleHeight: 1 + m_ReverseArrangement: 0 +--- !u!1001 &186862467977148592 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 123955173422469536} + m_TransformParent: {fileID: 5404881643567540767} m_Modifications: - - target: {fileID: 1583494373861945156, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579887, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, type: 3} propertyPath: m_Name - value: SimpleText + value: ManualPlacement objectReference: {fileID: 0} - - target: {fileID: 1583494373861945162, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 9059496043742693937, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, type: 3} propertyPath: m_text - value: Calibration + value: Manual Placement objectReference: {fileID: 0} - - target: {fileID: 1583494373861945162, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, type: 3} +--- !u!224 &6611600583773822876 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + m_PrefabInstance: {fileID: 186862467977148592} + m_PrefabAsset: {fileID: 0} +--- !u!114 &6611600583773822877 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6437545881720579885, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + m_PrefabInstance: {fileID: 186862467977148592} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &1938193808673895474 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 5404881643567540767} + m_Modifications: + - target: {fileID: 76707287574816940, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} - propertyPath: m_HorizontalAlignment - value: 2 + propertyPath: m_text + value: Reset Anchor Position objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5209102703780174917, guid: 92f7efb0c552b664d8d053441ef82c2f, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_Pivot.x value: 0.5 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_Pivot.y - value: 1 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_AnchorMax.x - value: 1 + value: 0.5 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_AnchorMin.x - value: 0 + value: 0.5 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 450 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_SizeDelta.y - value: 75 + value: 100 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalRotation.x - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_AnchoredPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_AnchoredPosition.y - value: -50 + value: 125 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + - target: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 6139604876641517976, guid: 92f7efb0c552b664d8d053441ef82c2f, + type: 3} + propertyPath: m_Name + value: LabelToggle + objectReference: {fileID: 0} + - target: {fileID: 7266210418336486107, guid: 92f7efb0c552b664d8d053441ef82c2f, + type: 3} + propertyPath: m_SizeDelta.x + value: -80 + objectReference: {fileID: 0} + - target: {fileID: 7266210418336486107, guid: 92f7efb0c552b664d8d053441ef82c2f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -40 + objectReference: {fileID: 0} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: e3dd512c2ee03da489b03ab37c3bb5b5, type: 3} ---- !u!224 &4749296874375559124 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, - type: 3} - m_PrefabInstance: {fileID: 6057719620819343519} - m_PrefabAsset: {fileID: 0} ---- !u!114 &4749296874375559125 stripped + m_SourcePrefab: {fileID: 100100000, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} +--- !u!114 &3445971308436304068 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 1583494373861945162, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + m_CorrespondingSourceObject: {fileID: 3834626354298930422, guid: 92f7efb0c552b664d8d053441ef82c2f, type: 3} - m_PrefabInstance: {fileID: 6057719620819343519} + m_PrefabInstance: {fileID: 1938193808673895474} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &5461992444048277342 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 5848273553044212588, guid: 92f7efb0c552b664d8d053441ef82c2f, + type: 3} + m_PrefabInstance: {fileID: 1938193808673895474} + m_PrefabAsset: {fileID: 0} +--- !u!1 &5751548506572010922 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6139604876641517976, guid: 92f7efb0c552b664d8d053441ef82c2f, + type: 3} + m_PrefabInstance: {fileID: 1938193808673895474} + m_PrefabAsset: {fileID: 0} +--- !u!114 &6778602511356439460 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5751548506572010922} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1001 &5659104680168359159 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 8619633074232835236} + m_Modifications: + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_SizeDelta.x + value: 300 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 250 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579887, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Name + value: ApplyPlane + objectReference: {fileID: 0} + - target: {fileID: 9059496043742693937, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_text + value: Apply + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, type: 3} +--- !u!114 &1720353505527751642 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6437545881720579885, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + m_PrefabInstance: {fileID: 5659104680168359159} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &1720353505527751643 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + m_PrefabInstance: {fileID: 5659104680168359159} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &6057719620819343519 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 123955173422469536} + m_Modifications: + - target: {fileID: 1583494373861945156, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_Name + value: SimpleText + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945162, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_text + value: Calibration + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945162, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_HorizontalAlignment + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_SizeDelta.y + value: 75 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -50 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e3dd512c2ee03da489b03ab37c3bb5b5, type: 3} +--- !u!224 &4749296874375559124 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1583494373861945163, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + m_PrefabInstance: {fileID: 6057719620819343519} + m_PrefabAsset: {fileID: 0} +--- !u!114 &4749296874375559125 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1583494373861945162, guid: e3dd512c2ee03da489b03ab37c3bb5b5, + type: 3} + m_PrefabInstance: {fileID: 6057719620819343519} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &6293278460418729572 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 5404881643567540767} + m_Modifications: + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6437545881720579887, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_Name + value: ImageTarget + objectReference: {fileID: 0} + - target: {fileID: 9059496043742693937, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + propertyPath: m_text + value: Image Target + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, type: 3} +--- !u!224 &1009077576210825544 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6437545881720579884, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + m_PrefabInstance: {fileID: 6293278460418729572} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1009077576210825545 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6437545881720579885, guid: cac36e8c0eba9da4b81f3a95bad2ee0f, + type: 3} + m_PrefabInstance: {fileID: 6293278460418729572} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} m_Name: m_EditorClassIdentifier: diff --git a/Assets/MirageXR/Tests/NewUI/Prefabs/UI_KIT/Toggles/LabelToggle.prefab b/Assets/MirageXR/Tests/NewUI/Prefabs/UI_KIT/Toggles/LabelToggle.prefab index 84781f843..de1a1ea25 100644 --- a/Assets/MirageXR/Tests/NewUI/Prefabs/UI_KIT/Toggles/LabelToggle.prefab +++ b/Assets/MirageXR/Tests/NewUI/Prefabs/UI_KIT/Toggles/LabelToggle.prefab @@ -31,7 +31,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 5848273553044212588} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -135,6 +135,82 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &5209102703780174917 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1849575583314772891} + - component: {fileID: 1728618412930155975} + - component: {fileID: 8617051440579810707} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1849575583314772891 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5209102703780174917} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5848273553044212588} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 40, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1728618412930155975 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5209102703780174917} + m_CullTransparentMesh: 1 +--- !u!114 &8617051440579810707 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5209102703780174917} + 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, g: 0, b: 0, a: 0.2} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 1d2cb36f7e520cc42b41371eec5dac5d, type: 3} + 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 &6139604876641517976 GameObject: m_ObjectHideFlags: 0 @@ -164,6 +240,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 1849575583314772891} - {fileID: 7266210418336486107} - {fileID: 9053003438685206431} m_Father: {fileID: 0} @@ -208,7 +285,7 @@ PrefabInstance: - target: {fileID: 2627964235497976040, guid: 2d5259a1589303e46990babb5e689f37, type: 3} propertyPath: m_RootOrder - value: 1 + value: 2 objectReference: {fileID: 0} - target: {fileID: 2627964235497976040, guid: 2d5259a1589303e46990babb5e689f37, type: 3} diff --git a/Assets/MirageXR/Tests/NewUI/StepsListView_v2.cs b/Assets/MirageXR/Tests/NewUI/StepsListView_v2.cs index b8dd0e5a9..6c4e3728a 100644 --- a/Assets/MirageXR/Tests/NewUI/StepsListView_v2.cs +++ b/Assets/MirageXR/Tests/NewUI/StepsListView_v2.cs @@ -7,6 +7,7 @@ using TMPro; using UnityEngine; using UnityEngine.UI; +using Action = System.Action; using Content = MirageXR.Action; public class StepsListView_v2 : BaseView @@ -445,17 +446,17 @@ private void OnActivityDescriptionEndEdit(string description) private void OnCalibrationPressed() { - if (_isEditMode) + if (RootObject.Instance.floorManager.isFloorDetected) { RootView_v2.Instance.dialog.ShowBottomMultiline(null, - ("Start Calibration", ShowCalibrationView), - ("New position of the calibration image", ShowNewPositionCalibrationView), + ("Start Calibration", ShowImageTargetCalibrationView), + ("Start Floor Detection", ShowFloorDetectionOnlyView), ("Get Calibration Image", ShareCalibrationImage)); } else { RootView_v2.Instance.dialog.ShowBottomMultiline(null, - ("Start Calibration", ShowCalibrationView), + ("Start Calibration", ShowImageTargetCalibrationView), ("Get Calibration Image", ShareCalibrationImage)); } } @@ -474,14 +475,14 @@ private IEnumerator SharePDFFile() new NativeShare().AddFile(filePath).Share(); } - private void ShowNewPositionCalibrationView() + private void ShowImageTargetCalibrationView() { - PopupsViewer.Instance.Show(_calibrationViewPrefab, (System.Action)OnCalibrationViewOpened, (System.Action)OnCalibrationViewClosed, true); + PopupsViewer.Instance.Show(_calibrationViewPrefab, (Action)OnCalibrationViewOpened, (Action)OnCalibrationViewClosed, false, false); } - private void ShowCalibrationView() + private void ShowFloorDetectionOnlyView() { - PopupsViewer.Instance.Show(_calibrationViewPrefab, (System.Action)OnCalibrationViewOpened, (System.Action)OnCalibrationViewClosed, false); + PopupsViewer.Instance.Show(_calibrationViewPrefab, (Action)OnCalibrationViewOpened, (Action)OnCalibrationViewClosed, false, true); } private void OnCalibrationViewOpened() diff --git a/Assets/UnitTests/PlayModeTests/CalibrationTests.cs b/Assets/UnitTests/PlayModeTests/CalibrationTests.cs index 861ed5969..361d22786 100644 --- a/Assets/UnitTests/PlayModeTests/CalibrationTests.cs +++ b/Assets/UnitTests/PlayModeTests/CalibrationTests.cs @@ -310,7 +310,7 @@ private async Task PerformCalibration(bool isEditMode) rootObject.activityManager.EditModeActive = isEditMode; // then run the player calibration routine to move objects (as though the camera is the marker) - await rootObject.workplaceManager.CalibrateWorkplace(WorldTestOrigin); + await rootObject.workplaceManager.CalibrateWorkplace(); } private void CalibrationComplete()