Skip to content

Commit a45258b

Browse files
committed
Samples: Improve consistency of description panel manipulation (#104)
* Allow DescriptionPanel to be consistently grabbed in order to move the main scene content for that sample. - Update the DescriptionPanel prefab to include ObjectManipulator, UGUIInputAdapterDraggable, ConstraintManager and a BoxCollider. * Update all scenes that reference DescriptionPanel to remove component duplication. * Reference the parent "MixedRealitySceneContent" game object as the host transform when DescriptionPanels are moved. * Removed some inconsistencies around game objects named "MixedRealitySceneContent", "SceneContent", "Content", "Examples", "Scene Content" to all be "MixedRealitySceneContent". * Add a rotation constraint to LegacyConstraintExamples scene content such that the content is always gravity aligned even after being moved via the description panel.
1 parent 0a8d247 commit a45258b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+8827
-20037
lines changed

UnityProjects/MRTKDevTemplate/Assets/Prefabs/SampleSceneHelper/DescriptionPanel.prefab

Lines changed: 322 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,10 @@ GameObject:
668668
- component: {fileID: 3220012215463627515}
669669
- component: {fileID: 8084989196684289760}
670670
- component: {fileID: 5404797170367061738}
671+
- component: {fileID: 7859784472259920099}
672+
- component: {fileID: 1161561103491172301}
673+
- component: {fileID: 5817619334857394158}
674+
- component: {fileID: 9132825215709135121}
671675
m_Layer: 5
672676
m_Name: DescriptionPanel
673677
m_TagString: Untagged
@@ -744,6 +748,310 @@ MonoBehaviour:
744748
m_DefaultSpriteDPI: 96
745749
m_DynamicPixelsPerUnit: 1
746750
m_PresetInfoIsWorld: 1
751+
--- !u!114 &7859784472259920099
752+
MonoBehaviour:
753+
m_ObjectHideFlags: 0
754+
m_CorrespondingSourceObject: {fileID: 0}
755+
m_PrefabInstance: {fileID: 0}
756+
m_PrefabAsset: {fileID: 0}
757+
m_GameObject: {fileID: 6540126486176102408}
758+
m_Enabled: 1
759+
m_EditorHideFlags: 0
760+
m_Script: {fileID: 11500000, guid: d9ad66e7cc9a2754d8ea989740c9f00d, type: 3}
761+
m_Name:
762+
m_EditorClassIdentifier:
763+
m_InteractionManager: {fileID: 0}
764+
m_Colliders: []
765+
m_InteractionLayerMask:
766+
serializedVersion: 2
767+
m_Bits: 4294967295
768+
m_InteractionLayers:
769+
m_Bits: 1
770+
m_DistanceCalculationMode: 1
771+
m_SelectMode: 1
772+
m_CustomReticle: {fileID: 0}
773+
m_AllowGazeInteraction: 0
774+
m_AllowGazeSelect: 0
775+
m_OverrideGazeTimeToSelect: 0
776+
m_GazeTimeToSelect: 0.5
777+
m_OverrideTimeToAutoDeselectGaze: 0
778+
m_TimeToAutoDeselectGaze: 3
779+
m_AllowGazeAssistance: 0
780+
m_FirstHoverEntered:
781+
m_PersistentCalls:
782+
m_Calls: []
783+
m_LastHoverExited:
784+
m_PersistentCalls:
785+
m_Calls: []
786+
m_HoverEntered:
787+
m_PersistentCalls:
788+
m_Calls: []
789+
m_HoverExited:
790+
m_PersistentCalls:
791+
m_Calls: []
792+
m_FirstSelectEntered:
793+
m_PersistentCalls:
794+
m_Calls: []
795+
m_LastSelectExited:
796+
m_PersistentCalls:
797+
m_Calls: []
798+
m_SelectEntered:
799+
m_PersistentCalls:
800+
m_Calls: []
801+
m_SelectExited:
802+
m_PersistentCalls:
803+
m_Calls: []
804+
m_Activated:
805+
m_PersistentCalls:
806+
m_Calls: []
807+
m_Deactivated:
808+
m_PersistentCalls:
809+
m_Calls: []
810+
m_StartingHoverFilters: []
811+
m_StartingSelectFilters: []
812+
m_StartingInteractionStrengthFilters: []
813+
m_OnFirstHoverEntered:
814+
m_PersistentCalls:
815+
m_Calls: []
816+
m_OnLastHoverExited:
817+
m_PersistentCalls:
818+
m_Calls: []
819+
m_OnHoverEntered:
820+
m_PersistentCalls:
821+
m_Calls: []
822+
m_OnHoverExited:
823+
m_PersistentCalls:
824+
m_Calls: []
825+
m_OnSelectEntered:
826+
m_PersistentCalls:
827+
m_Calls: []
828+
m_OnSelectExited:
829+
m_PersistentCalls:
830+
m_Calls: []
831+
m_OnSelectCanceled:
832+
m_PersistentCalls:
833+
m_Calls: []
834+
m_OnActivate:
835+
m_PersistentCalls:
836+
m_Calls: []
837+
m_OnDeactivate:
838+
m_PersistentCalls:
839+
m_Calls: []
840+
isGazePinchSelected:
841+
active: 0
842+
onEntered:
843+
m_PersistentCalls:
844+
m_Calls: []
845+
onExited:
846+
m_PersistentCalls:
847+
m_Calls: []
848+
isRaySelected:
849+
active: 0
850+
onEntered:
851+
m_PersistentCalls:
852+
m_Calls: []
853+
onExited:
854+
m_PersistentCalls:
855+
m_Calls: []
856+
isPokeSelected:
857+
active: 0
858+
onEntered:
859+
m_PersistentCalls:
860+
m_Calls: []
861+
onExited:
862+
m_PersistentCalls:
863+
m_Calls: []
864+
isGrabSelected:
865+
active: 0
866+
onEntered:
867+
m_PersistentCalls:
868+
m_Calls: []
869+
onExited:
870+
m_PersistentCalls:
871+
m_Calls: []
872+
isGazeHovered:
873+
active: 0
874+
onEntered:
875+
m_PersistentCalls:
876+
m_Calls: []
877+
onExited:
878+
m_PersistentCalls:
879+
m_Calls: []
880+
isGazePinchHovered:
881+
active: 0
882+
onEntered:
883+
m_PersistentCalls:
884+
m_Calls: []
885+
onExited:
886+
m_PersistentCalls:
887+
m_Calls: []
888+
isRayHovered:
889+
active: 0
890+
onEntered:
891+
m_PersistentCalls:
892+
m_Calls: []
893+
onExited:
894+
m_PersistentCalls:
895+
m_Calls: []
896+
isGrabHovered:
897+
active: 0
898+
onEntered:
899+
m_PersistentCalls:
900+
m_Calls: []
901+
onExited:
902+
m_PersistentCalls:
903+
m_Calls: []
904+
isPokeHovered:
905+
active: 0
906+
onEntered:
907+
m_PersistentCalls:
908+
m_Calls: []
909+
onExited:
910+
m_PersistentCalls:
911+
m_Calls: []
912+
isActiveHovered:
913+
active: 0
914+
onEntered:
915+
m_PersistentCalls:
916+
m_Calls: []
917+
onExited:
918+
m_PersistentCalls:
919+
m_Calls: []
920+
disabledInteractorTypes:
921+
- reference: MixedReality.Toolkit.IPokeInteractor, MixedReality.Toolkit.Core
922+
<ToggleMode>k__BackingField: 0
923+
<SelectThreshold>k__BackingField: 0.9
924+
<DeselectThreshold>k__BackingField: 0.1
925+
<TriggerOnRelease>k__BackingField: 1
926+
<UseGazeDwell>k__BackingField: 0
927+
<GazeDwellTime>k__BackingField: 1
928+
<UseFarDwell>k__BackingField: 0
929+
<FarDwellTime>k__BackingField: 1
930+
allowSelectByVoice: 1
931+
speechRecognitionKeyword: select
932+
<VoiceRequiresFocus>k__BackingField: 1
933+
<SelectRequiresHover>k__BackingField: 0
934+
<IsToggled>k__BackingField:
935+
active: 0
936+
onEntered:
937+
m_PersistentCalls:
938+
m_Calls: []
939+
onExited:
940+
m_PersistentCalls:
941+
m_Calls: []
942+
<OnClicked>k__BackingField:
943+
m_PersistentCalls:
944+
m_Calls: []
945+
<OnEnabled>k__BackingField:
946+
m_PersistentCalls:
947+
m_Calls: []
948+
<OnDisabled>k__BackingField:
949+
m_PersistentCalls:
950+
m_Calls: []
951+
hostTransform: {fileID: 3220012215463627515}
952+
allowedManipulations: 7
953+
allowedInteractionTypes: -2147483641
954+
rigidbodyMovementType: 0
955+
applyTorque: 1
956+
springForceSoftness: 0.1
957+
springTorqueSoftness: 0.1
958+
springDamping: 1
959+
springForceLimit: 100
960+
rotationAnchorNear: 1
961+
rotationAnchorFar: 1
962+
releaseBehavior: 3
963+
transformSmoothingLogicType:
964+
reference: MixedReality.Toolkit.SpatialManipulation.DefaultTransformSmoothingLogic,
965+
MixedReality.Toolkit.SpatialManipulation
966+
smoothingFar: 1
967+
smoothingNear: 1
968+
moveLerpTime: 0.001
969+
rotateLerpTime: 0.001
970+
scaleLerpTime: 0.001
971+
enableConstraints: 1
972+
constraintsManager: {fileID: 0}
973+
manipulationLogicTypes:
974+
moveLogicType:
975+
reference: MixedReality.Toolkit.SpatialManipulation.MoveLogic, MixedReality.Toolkit.SpatialManipulation
976+
rotateLogicType:
977+
reference: MixedReality.Toolkit.SpatialManipulation.RotateLogic, MixedReality.Toolkit.SpatialManipulation
978+
scaleLogicType:
979+
reference: MixedReality.Toolkit.SpatialManipulation.ScaleLogic, MixedReality.Toolkit.SpatialManipulation
980+
--- !u!114 &1161561103491172301
981+
MonoBehaviour:
982+
m_ObjectHideFlags: 0
983+
m_CorrespondingSourceObject: {fileID: 0}
984+
m_PrefabInstance: {fileID: 0}
985+
m_PrefabAsset: {fileID: 0}
986+
m_GameObject: {fileID: 6540126486176102408}
987+
m_Enabled: 1
988+
m_EditorHideFlags: 0
989+
m_Script: {fileID: 11500000, guid: 80f85af46f9bddd4ea78f11cee5e3b2e, type: 3}
990+
m_Name:
991+
m_EditorClassIdentifier:
992+
handType: 3
993+
proximityType: 3
994+
executionOrder: 0
995+
minimumScale: {x: 0.2, y: 0.2, z: 0.2}
996+
maximumScale: {x: 1.5, y: 1.5, z: 1.5}
997+
relativeToInitialState: 1
998+
--- !u!114 &5817619334857394158
999+
MonoBehaviour:
1000+
m_ObjectHideFlags: 0
1001+
m_CorrespondingSourceObject: {fileID: 0}
1002+
m_PrefabInstance: {fileID: 0}
1003+
m_PrefabAsset: {fileID: 0}
1004+
m_GameObject: {fileID: 6540126486176102408}
1005+
m_Enabled: 1
1006+
m_EditorHideFlags: 0
1007+
m_Script: {fileID: 11500000, guid: 3a1bf44e2291e8741ab3dec75055d9db, type: 3}
1008+
m_Name:
1009+
m_EditorClassIdentifier:
1010+
m_Navigation:
1011+
m_Mode: 3
1012+
m_WrapAround: 0
1013+
m_SelectOnUp: {fileID: 0}
1014+
m_SelectOnDown: {fileID: 0}
1015+
m_SelectOnLeft: {fileID: 0}
1016+
m_SelectOnRight: {fileID: 0}
1017+
m_Transition: 0
1018+
m_Colors:
1019+
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
1020+
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
1021+
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
1022+
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
1023+
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
1024+
m_ColorMultiplier: 1
1025+
m_FadeDuration: 0.1
1026+
m_SpriteState:
1027+
m_HighlightedSprite: {fileID: 0}
1028+
m_PressedSprite: {fileID: 0}
1029+
m_SelectedSprite: {fileID: 0}
1030+
m_DisabledSprite: {fileID: 0}
1031+
m_AnimationTriggers:
1032+
m_NormalTrigger: Normal
1033+
m_HighlightedTrigger: Highlighted
1034+
m_PressedTrigger: Pressed
1035+
m_SelectedTrigger: Selected
1036+
m_DisabledTrigger: Disabled
1037+
m_Interactable: 1
1038+
m_TargetGraphic: {fileID: 0}
1039+
movableAxes: 0
1040+
onMoveDelta: 0.01
1041+
--- !u!114 &9132825215709135121
1042+
MonoBehaviour:
1043+
m_ObjectHideFlags: 0
1044+
m_CorrespondingSourceObject: {fileID: 0}
1045+
m_PrefabInstance: {fileID: 0}
1046+
m_PrefabAsset: {fileID: 0}
1047+
m_GameObject: {fileID: 6540126486176102408}
1048+
m_Enabled: 1
1049+
m_EditorHideFlags: 0
1050+
m_Script: {fileID: 11500000, guid: 50cdab0cd5a0916419324bb54314773d, type: 3}
1051+
m_Name:
1052+
m_EditorClassIdentifier:
1053+
autoConstraintSelection: 1
1054+
selectedConstraints: []
7471055
--- !u!1 &7368034384095272423
7481056
GameObject:
7491057
m_ObjectHideFlags: 0
@@ -872,6 +1180,7 @@ GameObject:
8721180
- component: {fileID: 5493534032387613222}
8731181
- component: {fileID: 1262417381534939274}
8741182
- component: {fileID: 6676203961570324161}
1183+
- component: {fileID: 6142172929716962050}
8751184
m_Layer: 0
8761185
m_Name: BackPlate
8771186
m_TagString: Untagged
@@ -944,3 +1253,16 @@ MeshRenderer:
9441253
m_SortingLayer: 0
9451254
m_SortingOrder: 0
9461255
m_AdditionalVertexStreams: {fileID: 0}
1256+
--- !u!65 &6142172929716962050
1257+
BoxCollider:
1258+
m_ObjectHideFlags: 0
1259+
m_CorrespondingSourceObject: {fileID: 0}
1260+
m_PrefabInstance: {fileID: 0}
1261+
m_PrefabAsset: {fileID: 0}
1262+
m_GameObject: {fileID: 8323939510892415185}
1263+
m_Material: {fileID: 0}
1264+
m_IsTrigger: 0
1265+
m_Enabled: 1
1266+
serializedVersion: 2
1267+
m_Size: {x: 1, y: 1.0000001, z: 1.94}
1268+
m_Center: {x: -0.000000074505806, y: -0.000000029802322, z: 0.05000001}

0 commit comments

Comments
 (0)