From 8185c4b3a51fd890d444c5a20eb675e8082b5246 Mon Sep 17 00:00:00 2001 From: Marlena Klein <125413876+marlenaklein-msft@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:22:26 -0700 Subject: [PATCH] Add BoundsControlRuntimeExample (#11740) Add scene and script for BoundsControlRuntimeExample. Adjust Toggle Drag Threshold. --- .../Scenes/BoundsControlRuntimeExample.unity | 1452 +++++++++++++++++ .../BoundsControlRuntimeExample.unity.meta | 7 + .../Scripts/BoundsControlRuntimeExample.cs | 246 +++ .../BoundsControlRuntimeExample.cs.meta | 11 + .../BoundsControl/BoundsControl.cs | 2 +- 5 files changed, 1717 insertions(+), 1 deletion(-) create mode 100644 UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity create mode 100644 UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity.meta create mode 100644 UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs create mode 100644 UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs.meta diff --git a/UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity b/UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity new file mode 100644 index 00000000000..5b65bcf7077 --- /dev/null +++ b/UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity @@ -0,0 +1,1452 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 705507994} + m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &95915942 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1006616005} + m_Modifications: + - target: {fileID: 566361764857432160, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_SizeDelta.y + value: 16.95 + objectReference: {fileID: 0} + - target: {fileID: 566361764857432160, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.z + value: -0.69998 + objectReference: {fileID: 0} + - target: {fileID: 566361764857432160, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.x + value: 86.76 + objectReference: {fileID: 0} + - target: {fileID: 566361764857432160, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.y + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 772928284761863525, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.y + value: -102.3 + objectReference: {fileID: 0} + - target: {fileID: 2446705927233332293, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_text + value: 'This example demonstrates how to create a bounds control at runtime + and modify various bounds control properties. + + + Say "next" or press + Next button to advance to the next example.' + objectReference: {fileID: 0} + - target: {fileID: 2446705927233332293, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_margin.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2446705927233332293, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_margin.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2446705927233332293, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_overflowMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_SizeDelta.x + value: 175.02396 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_SizeDelta.y + value: 93.4684 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.z + value: 0.834 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalRotation.w + value: 0.98792666 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15492237 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.x + value: -0.371 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.y + value: 1.665 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -17.825 + objectReference: {fileID: 0} + - target: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3732017194820540582, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.x + value: -48.7 + objectReference: {fileID: 0} + - target: {fileID: 3732017194820540582, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.y + value: 26.4 + objectReference: {fileID: 0} + - target: {fileID: 3732017194820540582, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.z + value: -0.7 + objectReference: {fileID: 0} + - target: {fileID: 4568172237328552037, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_text + value: Bounds Control Runtime Example + objectReference: {fileID: 0} + - target: {fileID: 4568172237328552037, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_margin.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4568172237328552037, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_margin.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5158546944129612579, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.y + value: -1.4 + objectReference: {fileID: 0} + - target: {fileID: 5493534032387613222, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalScale.y + value: 164.42848 + objectReference: {fileID: 0} + - target: {fileID: 5493534032387613222, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.y + value: -33.84 + objectReference: {fileID: 0} + - target: {fileID: 5929991690626966069, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6540126486176102408, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_Name + value: DescriptionPanel + objectReference: {fileID: 0} + - target: {fileID: 6540126486176102408, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6809291684801504143, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_text + value: 'BoundsControl + + IBoundsVisuals + + BoundsHandleInteractable' + objectReference: {fileID: 0} + - target: {fileID: 6809291684801504143, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_margin.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6809291684801504143, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_margin.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6881520559800330969, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.z + value: -0.7 + objectReference: {fileID: 0} + - target: {fileID: 6881520559800330969, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.x + value: 91.400024 + objectReference: {fileID: 0} + - target: {fileID: 6881520559800330969, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.y + value: -52.199997 + objectReference: {fileID: 0} + - target: {fileID: 7368034384095272423, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9182356717869552287, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_SizeDelta.y + value: 17.21 + objectReference: {fileID: 0} + - target: {fileID: 9182356717869552287, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_LocalPosition.z + value: -0.7 + objectReference: {fileID: 0} + - target: {fileID: 9182356717869552287, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.x + value: 91.4 + objectReference: {fileID: 0} + - target: {fileID: 9182356717869552287, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + propertyPath: m_AnchoredPosition.y + value: -59.71 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} +--- !u!1 &95915943 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6540126486176102408, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + m_PrefabInstance: {fileID: 95915942} + m_PrefabAsset: {fileID: 0} +--- !u!224 &95915944 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3220012215463627515, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + m_PrefabInstance: {fileID: 95915942} + m_PrefabAsset: {fileID: 0} +--- !u!1 &95915945 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8323939510892415185, guid: e8c3ea3c1046f8b4bbd682c2b7a0e4fe, type: 3} + m_PrefabInstance: {fileID: 95915942} + m_PrefabAsset: {fileID: 0} +--- !u!114 &95915946 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 95915943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d9ad66e7cc9a2754d8ea989740c9f00d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_InteractionManager: {fileID: 0} + m_Colliders: [] + m_InteractionLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_InteractionLayers: + m_Bits: 1 + m_DistanceCalculationMode: 1 + m_SelectMode: 1 + m_CustomReticle: {fileID: 0} + m_AllowGazeInteraction: 0 + m_AllowGazeSelect: 0 + m_OverrideGazeTimeToSelect: 0 + m_GazeTimeToSelect: 0.5 + m_OverrideTimeToAutoDeselectGaze: 0 + m_TimeToAutoDeselectGaze: 3 + m_AllowGazeAssistance: 0 + m_FirstHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_LastHoverExited: + m_PersistentCalls: + m_Calls: [] + m_HoverEntered: + m_PersistentCalls: + m_Calls: [] + m_HoverExited: + m_PersistentCalls: + m_Calls: [] + m_FirstSelectEntered: + m_PersistentCalls: + m_Calls: [] + m_LastSelectExited: + m_PersistentCalls: + m_Calls: [] + m_SelectEntered: + m_PersistentCalls: + m_Calls: [] + m_SelectExited: + m_PersistentCalls: + m_Calls: [] + m_Activated: + m_PersistentCalls: + m_Calls: [] + m_Deactivated: + m_PersistentCalls: + m_Calls: [] + m_StartingHoverFilters: [] + m_StartingSelectFilters: [] + m_StartingInteractionStrengthFilters: [] + m_OnFirstHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_OnLastHoverExited: + m_PersistentCalls: + m_Calls: [] + m_OnHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_OnHoverExited: + m_PersistentCalls: + m_Calls: [] + m_OnSelectEntered: + m_PersistentCalls: + m_Calls: [] + m_OnSelectExited: + m_PersistentCalls: + m_Calls: [] + m_OnSelectCanceled: + m_PersistentCalls: + m_Calls: [] + m_OnActivate: + m_PersistentCalls: + m_Calls: [] + m_OnDeactivate: + m_PersistentCalls: + m_Calls: [] + isGazePinchSelected: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isRaySelected: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isPokeSelected: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isGrabSelected: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isGazeHovered: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isGazePinchHovered: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isRayHovered: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isGrabHovered: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isPokeHovered: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + isActiveHovered: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + disabledInteractorTypes: + - reference: Microsoft.MixedReality.Toolkit.IPokeInteractor, Microsoft.MixedReality.Toolkit.Core + k__BackingField: 0 + k__BackingField: 0.9 + k__BackingField: 0.1 + k__BackingField: 1 + k__BackingField: 0 + k__BackingField: 1 + k__BackingField: 0 + k__BackingField: 1 + allowSelectByVoice: 1 + speechRecognitionKeyword: select + k__BackingField: 1 + k__BackingField: 0 + k__BackingField: + active: 0 + onEntered: + m_PersistentCalls: + m_Calls: [] + onExited: + m_PersistentCalls: + m_Calls: [] + k__BackingField: + m_PersistentCalls: + m_Calls: [] + k__BackingField: + m_PersistentCalls: + m_Calls: [] + k__BackingField: + m_PersistentCalls: + m_Calls: [] + hostTransform: {fileID: 95915944} + allowedManipulations: 7 + allowedInteractionTypes: -2147483641 + applyTorque: 1 + springForceSoftness: 0.1 + springTorqueSoftness: 0.1 + springDamping: 1 + springForceLimit: 100 + rotationAnchorNear: 1 + rotationAnchorFar: 1 + releaseBehavior: 3 + transformSmoothingLogicType: + reference: Microsoft.MixedReality.Toolkit.SpatialManipulation.DefaultTransformSmoothingLogic, + Microsoft.MixedReality.Toolkit.SpatialManipulation + smoothingFar: 1 + smoothingNear: 1 + moveLerpTime: 0.001 + rotateLerpTime: 0.001 + scaleLerpTime: 0.001 + enableConstraints: 1 + constraintsManager: {fileID: 0} + manipulationLogicTypes: + moveLogicType: + reference: Microsoft.MixedReality.Toolkit.SpatialManipulation.MoveLogic, Microsoft.MixedReality.Toolkit.SpatialManipulation + rotateLogicType: + reference: Microsoft.MixedReality.Toolkit.SpatialManipulation.RotateLogic, + Microsoft.MixedReality.Toolkit.SpatialManipulation + scaleLogicType: + reference: Microsoft.MixedReality.Toolkit.SpatialManipulation.ScaleLogic, Microsoft.MixedReality.Toolkit.SpatialManipulation +--- !u!114 &95915947 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 95915943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 50cdab0cd5a0916419324bb54314773d, type: 3} + m_Name: + m_EditorClassIdentifier: + autoConstraintSelection: 1 + selectedConstraints: [] +--- !u!114 &95915948 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 95915943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f3f2652d4ff14543be4d1ece28036a0, type: 3} + m_Name: + m_EditorClassIdentifier: + boundsVisualsPrefab: {fileID: 5671351296789090341, guid: 7b542306e34a62f4c9a822fcb19b7d99, type: 3} + boundsCalculationMethod: 0 + includeInactiveObjects: 0 + overrideBounds: 0 + boundsOverride: {fileID: 0} + flattenMode: 1 + boundsPadding: 0.02 + interactable: {fileID: 0} + toggleHandlesOnClick: 1 + dragToggleThreshold: 0.005 + target: {fileID: 0} + handlesActive: 0 + enabledHandles: 2 + rotateAnchor: 1 + scaleAnchor: 0 + scaleBehavior: 0 + smoothingActive: 1 + rotateLerpTime: 0.00001 + scaleLerpTime: 0.00001 + translateLerpTime: 0.00001 + enableConstraints: 1 + constraintsManager: {fileID: 0} + manipulationStarted: + m_PersistentCalls: + m_Calls: [] + manipulationEnded: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &95915949 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 95915943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a1bf44e2291e8741ab3dec75055d9db, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 0} + movableAxes: 0 + onMoveDelta: 0.01 +--- !u!114 &95915950 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 95915943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 80f85af46f9bddd4ea78f11cee5e3b2e, type: 3} + m_Name: + m_EditorClassIdentifier: + handType: 3 + proximityType: 3 + executionOrder: 0 + minimumScale: {x: 0.2, y: 0.2, z: 0.2} + maximumScale: {x: 1.5, y: 1.5, z: 1.5} + relativeToInitialState: 1 +--- !u!1001 &291233360 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1006616005} + m_Modifications: + - target: {fileID: 663229184210891148, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 663229184210891148, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0.0113 + objectReference: {fileID: 0} + - target: {fileID: 663229184210891148, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.0015 + objectReference: {fileID: 0} + - target: {fileID: 1220126735185249923, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_Name + value: Next Button + objectReference: {fileID: 0} + - target: {fileID: 1220126735637944176, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalPosition.z + value: 0.00000003648165 + objectReference: {fileID: 0} + - target: {fileID: 1220126735637944176, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_AnchoredPosition.x + value: -0.008700009 + objectReference: {fileID: 0} + - target: {fileID: 1220126735637944179, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_text + value: Next + objectReference: {fileID: 0} + - target: {fileID: 1220126735637944179, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_fontSize + value: 0.09 + objectReference: {fileID: 0} + - target: {fileID: 1220126735637944179, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_fontSizeBase + value: 0.09 + objectReference: {fileID: 0} + - target: {fileID: 1220126735637944179, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_HorizontalAlignment + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalPosition.x + value: -0.371 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalPosition.y + value: 1.5019 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalPosition.z + value: 0.834 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalRotation.w + value: 0.98792666 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalRotation.y + value: -0.15492237 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: speechRecognitionKeyword + value: next + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1886794916} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnShouldAdvanceSequence + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: Microsoft.MixedReality.Toolkit.Examples.Demos.BoundsControlRuntimeExample, + Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 1952199377435673060, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: k__BackingField.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 6269686766409953470, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_text + value: "\uF182" + objectReference: {fileID: 0} + - target: {fileID: 6269686766409953470, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_fontSize + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 6269686766409953470, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_fontStyle + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6269686766409953470, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_fontSizeBase + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 6269686766409953470, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_sharedMaterial + value: + objectReference: {fileID: 5762245003366665926, guid: 9b0d0ee11ff70b04d901a29b519cbaa0, type: 2} + - target: {fileID: 6269686766409953470, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_HorizontalAlignment + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 6269686766409953470, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_hasFontAssetChanged + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7119852961148484655, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 5762245003366665926, guid: 9b0d0ee11ff70b04d901a29b519cbaa0, type: 2} + - target: {fileID: 7205179014930355550, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + propertyPath: currentIconName + value: Icon 42 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} +--- !u!4 &291233361 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1220126736778559586, guid: 5e1e5c2fb89ded5469dd37ccbed1a896, type: 3} + m_PrefabInstance: {fileID: 291233360} + m_PrefabAsset: {fileID: 0} +--- !u!1 &414943980 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 414943983} + - component: {fileID: 414943982} + - component: {fileID: 414943981} + m_Layer: 0 + m_Name: Status Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &414943981 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 414943980} + 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: Status Text + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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.32 + m_fontSizeBase: 0.32 + 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: 0 + 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: 414943982} + m_maskType: 0 +--- !u!23 &414943982 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 414943980} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 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!224 &414943983 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 414943980} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.047} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1006616005} + 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.046, y: 1.664} + m_SizeDelta: {x: 0.6279, y: 0.2077} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1001 &525252187 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720332, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2351505567455720334, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_Name + value: MRTK XR Rig + objectReference: {fileID: 0} + - target: {fileID: 8479077998186684813, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 4d7e2f87fefe0ba468719b15288b46e7, type: 3} +--- !u!1001 &640980041 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 5905304275062509466, guid: df4899a7e84d2794a9428337bba8a253, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 5905304275062509466, guid: df4899a7e84d2794a9428337bba8a253, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5905304275062509466, guid: df4899a7e84d2794a9428337bba8a253, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5905304275062509466, guid: df4899a7e84d2794a9428337bba8a253, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5905304275062509471, guid: df4899a7e84d2794a9428337bba8a253, type: 3} + propertyPath: m_Name + value: EventSystem + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: df4899a7e84d2794a9428337bba8a253, type: 3} +--- !u!1 &705507993 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 705507995} + - component: {fileID: 705507994} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &705507994 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &705507995 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!65 &904132850 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 95915945} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1.0000001, z: 1.94} + m_Center: {x: -0.000000074505806, y: -0.000000029802322, z: 0.05000001} +--- !u!1 &1006616004 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1006616005} + m_Layer: 0 + m_Name: MixedRealitySceneContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1006616005 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1006616004} + 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: 95915944} + - {fileID: 1886794917} + - {fileID: 414943983} + - {fileID: 291233361} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1531496039 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7372669237086358564, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_Name + value: SampleSceneHandMenu + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7372669237086358568, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8bfb4497dda968b469f9c0c4a22374d1, type: 3} +--- !u!1001 &1789277895 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3493013819197874656, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7585035320575375756, guid: ad5b753b73e311143a85055b15cea562, type: 3} + propertyPath: m_Name + value: MRTKInputSimulator + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: ad5b753b73e311143a85055b15cea562, type: 3} +--- !u!1 &1886794915 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1886794917} + - component: {fileID: 1886794916} + m_Layer: 0 + m_Name: Bounds Control Test + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1886794916 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1886794915} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9c3595740666d6e459c6cedb40921289, type: 3} + m_Name: + m_EditorClassIdentifier: + statusText: {fileID: 414943981} + darkGrayMaterial: {fileID: 2100000, guid: 4b78d3a2e1ab7c0499ce81ca8d18e7b5, type: 2} + redMaterial: {fileID: 2100000, guid: db61b94b23e5fb444b86c231d13e46ef, type: 2} + cyanMaterial: {fileID: 2100000, guid: 0c3570eeff29ef44e9fed596a4cc3ffd, type: 2} + boundsVisualsPrefab: {fileID: 5671351296789090341, guid: ecbf05ce2121a744cb893e82377ba3cd, type: 3} +--- !u!4 &1886794917 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1886794915} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: 0.7521197} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1006616005} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity.meta b/UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity.meta new file mode 100644 index 00000000000..a7b5faa7f8d --- /dev/null +++ b/UnityProjects/MRTKDevTemplate/Assets/Scenes/BoundsControlRuntimeExample.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5c5bd8aafc6e8f24688a5be83e975c2e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs b/UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs new file mode 100644 index 00000000000..ba168dd49d2 --- /dev/null +++ b/UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples. +#pragma warning disable CS1591 + +using Microsoft.MixedReality.Toolkit.SpatialManipulation; +using Microsoft.MixedReality.Toolkit.UX; +using System.Collections; +using System.Text; +using TMPro; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Examples.Demos +{ + /// + /// This example script demonstrates various bounds control runtime configurations. + /// + public class BoundsControlRuntimeExample : MonoBehaviour + { + [SerializeField] + private TextMeshPro statusText; + + [SerializeField] + private Material darkGrayMaterial; + [SerializeField] + private Material redMaterial; + [SerializeField] + private Material cyanMaterial; + + [SerializeField] + private GameObject boundsVisualsPrefab; + + private bool nextTriggeredFlag; + private Vector3 cubePosition = new Vector3(0, 1.2f, 2); + private Vector3 cubeSize = new Vector3(0.5f, 0.5f, 0.5f); + private BoundsControl boundsControl; + private StringBuilder stringBuilder = new StringBuilder(); + + /// + /// A Unity event function that is called on the frame when a script is enabled just before any of the update methods are called the first time. + /// + protected virtual void Start() + { + StartCoroutine(Sequence()); + } + + /// + /// Method to update the in-scene status text. + /// + /// The new status text. + private void SetStatus(string status) + { + Debug.Assert(statusText != null, "statusText on BoundsControlRuntimeExample should not be null"); + stringBuilder.Clear(); + stringBuilder.AppendLine($"{status}"); + stringBuilder.AppendLine($"Press Next or say 'next' to continue"); + statusText.text = stringBuilder.ToString(); + } + + /// + /// Coroutine method to advance the state of the example scene. + /// + private IEnumerator Sequence() + { + { + var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); + Debug.Assert(darkGrayMaterial != null); + cube.GetComponent().material = darkGrayMaterial; + cube.transform.position = cubePosition; + cube.transform.localScale = cubeSize; + + SetStatus("Instantiate BoundsControl"); + boundsControl = InitializeBoundsControl(cube); + yield return WaitForButtonPressOrCommand(); + + SetStatus("Set Target bounds override"); + var newObject = new GameObject(); + newObject.transform.position = new Vector3(0.8f, 0.8f, 1.8f); + var bc = newObject.AddComponent(); + bc.size = new Vector3(0.162f, 0.1f, 1); + boundsControl.OverrideBounds = true; + boundsControl.BoundsOverride = bc.transform; + yield return WaitForButtonPressOrCommand(); + + SetStatus("Change target bounds override size"); + bc.size = new Vector3(0.5f, 0.1f, 1); + boundsControl.RecomputeBounds(); + yield return WaitForButtonPressOrCommand(); + + SetStatus("RotateAnchor Object Origin"); + boundsControl.RotateAnchor = RotateAnchorType.ObjectOrigin; + yield return WaitForButtonPressOrCommand(); + + SetStatus("RotateAnchor Bounds Center"); + boundsControl.RotateAnchor = RotateAnchorType.BoundsCenter; + yield return WaitForButtonPressOrCommand(); + + SetStatus("ScaleAnchor Opposite Corner"); + boundsControl.ScaleAnchor = ScaleAnchorType.OppositeCorner; + yield return WaitForButtonPressOrCommand(); + + SetStatus("ScaleAnchor Bounds Center"); + boundsControl.ScaleAnchor = ScaleAnchorType.BoundsCenter; + yield return WaitForButtonPressOrCommand(); + + SetStatus("Remove target bounds override"); + boundsControl.OverrideBounds = false; + boundsControl.BoundsOverride = null; + Destroy(newObject); + yield return WaitForButtonPressOrCommand(); + + SetStatus("FlattenAuto"); + boundsControl.FlattenMode = FlattenMode.Auto; + yield return WaitForButtonPressOrCommand(); + + SetStatus("FlattenAlways"); + boundsControl.FlattenMode = FlattenMode.Always; + yield return WaitForButtonPressOrCommand(); + + SetStatus("FlattenNever"); + boundsControl.FlattenMode = FlattenMode.Never; + yield return WaitForButtonPressOrCommand(); + + SetStatus("BoxPadding 0.2f"); + boundsControl.BoundsPadding = 0.2f; + yield return WaitForButtonPressOrCommand(); + + SetStatus("BoxPadding 0"); + boundsControl.BoundsPadding = 0.0f; + yield return WaitForButtonPressOrCommand(); + + SetStatus("Scale X and update rig"); + cube.transform.localScale = new Vector3(1, 0.5f, 0.5f); + yield return WaitForButtonPressOrCommand(); + + SetStatus("Rotate 20 degrees and update rig"); + cube.transform.localRotation = Quaternion.Euler(0, 20, 0); + yield return WaitForButtonPressOrCommand(); + + SetStatus("HandleType None"); + boundsControl.EnabledHandles = HandleType.None; + yield return WaitForButtonPressOrCommand(); + + SetStatus("HandleType Rotation"); + boundsControl.EnabledHandles = HandleType.Rotation; + yield return WaitForButtonPressOrCommand(); + + SetStatus("HandleType Scale"); + boundsControl.EnabledHandles = HandleType.Scale; + yield return WaitForButtonPressOrCommand(); + + SetStatus("HandleType Translation"); + boundsControl.EnabledHandles = HandleType.Translation; + yield return WaitForButtonPressOrCommand(); + + Destroy(cube); + + SetStatus("Many children"); + + GameObject multiRoot = new GameObject(); + multiRoot.name = "multiRoot"; + Vector3 forwardOffset = Vector3.forward * .5f; + multiRoot.transform.position = cubePosition + forwardOffset; + + Transform lastParent = null; + + int numCubes = 10; + for (int i = 0; i < numCubes; i++) + { + var cubechild = GameObject.CreatePrimitive(PrimitiveType.Cube); + cubechild.GetComponent().material = darkGrayMaterial; + cubechild.transform.localPosition = Random.insideUnitSphere + cubePosition + forwardOffset; + cubechild.transform.rotation = Quaternion.Euler(Random.insideUnitSphere * 360f); + cubechild.transform.parent = (lastParent != null) ? lastParent : multiRoot.transform; + float baseScale = lastParent == null ? 0.1f : 1f; + cubechild.transform.localScale = new Vector3(baseScale, baseScale, baseScale); + lastParent = cubechild.transform; + } + + boundsControl = InitializeBoundsControl(multiRoot); + + SetStatus("Randomize Child Scale for skewing"); + yield return WaitForButtonPressOrCommand(); + + multiRoot.transform.position += Vector3.forward * 200f; + + var childTransform = multiRoot.transform; + while (childTransform.childCount > 0) + { + childTransform = childTransform.GetChild(0); + float baseScale = lastParent == null ? 0.1f : 1f; + childTransform.transform.localScale = new Vector3(baseScale * Random.Range(.5f, 2f), baseScale * Random.Range(.5f, 2f), baseScale * Random.Range(.5f, 2f)); + } + + boundsControl.RecomputeBounds(); + SetStatus("Delete GameObject"); + yield return WaitForButtonPressOrCommand(); + + Destroy(multiRoot); + } + + SetStatus("Done!"); + } + + /// + /// Set up a BoundsControl component on the target GameObject. + /// + /// The gameobject to set up the BoundsControl on. + /// The created component + private BoundsControl InitializeBoundsControl(GameObject target) + { + target.AddComponent(); + target.AddComponent(); + var boundsControl = target.AddComponent(); + boundsControl.BoundsVisualsPrefab = boundsVisualsPrefab; + boundsControl.HandlesActive = true; + boundsControl.DragToggleThreshold = .02f; + target.AddComponent(); + + return boundsControl; + } + + /// + /// Coroutine method to wait for the next button press or speech command + /// + private IEnumerator WaitForButtonPressOrCommand() + { + while (!nextTriggeredFlag) + { + yield return null; + } + + nextTriggeredFlag = false; + } + + /// + /// Method triggered by the next button in the scene + /// + public void OnShouldAdvanceSequence() + { + nextTriggeredFlag = true; + } + } +} +#pragma warning restore CS1591 diff --git a/UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs.meta b/UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs.meta new file mode 100644 index 00000000000..35947ac20dd --- /dev/null +++ b/UnityProjects/MRTKDevTemplate/Assets/Scripts/BoundsControlRuntimeExample.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c3595740666d6e459c6cedb40921289 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs b/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs index 7265129b512..82103662516 100644 --- a/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs +++ b/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs @@ -200,7 +200,7 @@ public bool ToggleHandlesOnClick [SerializeField] [DrawIf("toggleHandlesOnClick")] [Tooltip("During a selection of the associated interactable, if the interactable is dragged/moved a smaller distance than this value, the handles will be activated/deactivated.")] - private float dragToggleThreshold = 0.005f; + private float dragToggleThreshold = 0.02f; /// /// During a selection of the associated interactable, if the interactable is