From d837b0ccd72a9b9e31115d656548172bb08b1ad0 Mon Sep 17 00:00:00 2001 From: Sohail Shafii Date: Mon, 23 Sep 2024 13:52:49 -0700 Subject: [PATCH 1/9] fix(samples): Fix for ISDK scene when controllers are used Summary: The ISDK scene was using a `OVRControllerHands` prefab for controller-driven hands. Its synthetic hands, which are ISDK hand meshes that represent how the hands wrap around the controllers, were being use to modify the body tracking hand poses. When they grabbed the cup and used plausible cup-holding poses, the ISDK-MSDK character's hands did the same. The integration was similar to the `OVRHands` prefab, which performed the same function but with the hands. The problem is that `OVRControllerHands` is now deprecated and produces errors in the scene. We can "Capsense" instead (https://developers.meta.com/horizon/documentation/unity/unity-capsense/), because that allows the hands to be driven even if controllers are being used. The changes are as follows: 1. Delete `OVRControllersHands` and also the references to its `SkeletalHandsAdjustment` component under `ArmatureSkinningUpdateRetargetSkeletonProcessor`. Delete the entries `LeftControllerHandSynthentic` and `RightControllerHandSynthentic`. 2. In `OVRCameraRig`->`OVRManager`, navigate to the "Controller Driven Hand Poses Type" and set it to Natural. 3. In each `OVRHandPrefab`, navigate to `OVRHand` and set "Show State" to Always (not something like "Contoroller Not In Hand"). Because `OVRControllerHands` is deleted and we can rely on `OVRHands` to be driven by controllers inputs, the scene is less deprecated and simpler. Reviewed By: andkim-meta Differential Revision: D63056976 fbshipit-source-id: edbf84648f52d1de6083b066960d48cd9f7c3ae9 --- .../Scenes/MovementISDKIntegration.unity | 1005 +++-------------- 1 file changed, 169 insertions(+), 836 deletions(-) diff --git a/Samples/AdvancedSamples/Scenes/MovementISDKIntegration.unity b/Samples/AdvancedSamples/Scenes/MovementISDKIntegration.unity index 8e954dc9..221ebf22 100644 --- a/Samples/AdvancedSamples/Scenes/MovementISDKIntegration.unity +++ b/Samples/AdvancedSamples/Scenes/MovementISDKIntegration.unity @@ -363,6 +363,10 @@ PrefabInstance: propertyPath: HandType value: 1 objectReference: {fileID: 0} + - target: {fileID: 114428879332287356, guid: 835e735ca71bf78459fb2cababd74112, type: 3} + propertyPath: m_showState + value: 0 + objectReference: {fileID: 0} - target: {fileID: 114567484643301796, guid: 835e735ca71bf78459fb2cababd74112, type: 3} propertyPath: _skeletonType value: 1 @@ -2093,7 +2097,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.size - value: 5 + value: 3 objectReference: {fileID: 0} - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.data[0].label @@ -2109,11 +2113,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.data[3].label - value: LeftControllerHandSynthentic + value: OVRLeftHandSynthetic objectReference: {fileID: 0} - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.data[4].label - value: RightControllerHandSynthetic + value: OVRRightHandSynthetic objectReference: {fileID: 0} - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.data[5].label @@ -2174,11 +2178,11 @@ PrefabInstance: - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.data[3].Processor value: - objectReference: {fileID: 378448153326864063} + objectReference: {fileID: 0} - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.data[4].Processor value: - objectReference: {fileID: 378448153010514344} + objectReference: {fileID: 0} - target: {fileID: 490024389854361152, guid: 1d0c5ce9ae27cab4b88cd35738a08552, type: 3} propertyPath: _skeletonProcessors.Array.data[5].Processor value: @@ -3140,6 +3144,10 @@ PrefabInstance: propertyPath: m_Enabled value: 0 objectReference: {fileID: 0} + - target: {fileID: 114428879332287356, guid: 835e735ca71bf78459fb2cababd74112, type: 3} + propertyPath: m_showState + value: 0 + objectReference: {fileID: 0} - target: {fileID: 114925265787909616, guid: 835e735ca71bf78459fb2cababd74112, type: 3} propertyPath: m_Enabled value: 0 @@ -3583,6 +3591,10 @@ PrefabInstance: propertyPath: _trackingOriginType value: 1 objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 3} + propertyPath: controllerDrivenHandPosesType + value: 2 + objectReference: {fileID: 0} - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 3} propertyPath: requestEyeTrackingPermissionOnStartup value: 1 @@ -4109,36 +4121,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &378448153010514344 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8031081105206769669} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 932aa90fceecb0c4f8f4f94f0497f6bf, type: 3} - m_Name: - m_EditorClassIdentifier: - _hand: {fileID: 8031081105206769666} - _cameraRig: {fileID: 2075359725} - _handsAreOffset: 0 ---- !u!114 &378448153326864063 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8031081105206769674} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 932aa90fceecb0c4f8f4f94f0497f6bf, type: 3} - m_Name: - m_EditorClassIdentifier: - _hand: {fileID: 8031081105206769671} - _cameraRig: {fileID: 2075359725} - _handsAreOffset: 0 --- !u!1001 &420457022317728250 PrefabInstance: m_ObjectHideFlags: 0 @@ -5486,44 +5468,6 @@ MonoBehaviour: _loop: 0 _chanceToPlay: 100 _playOnStart: 0 ---- !u!114 &4079057276159561854 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403985441543727} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 887c8dbd7b891004dbddaf2d9f439564, type: 3} - m_Name: - m_EditorClassIdentifier: - _handGrabInteractor: {fileID: 5995403985441543724} - _handMaterialPropertyBlockEditor: {fileID: 8031081105206769670} - _glowLerpSpeed: 2 - _glowColorLerpSpeed: 4 - _fingerGlowColorWithInteractable: {r: 1, g: 0.81960785, b: 0.4509804, a: 1} - _fingerGlowColorWithNoInteractable: {r: 0.43921572, g: 0.56078434, b: 0.5686275, a: 1} - _fingerGlowColorHover: {r: 0.4392157, g: 0.56078434, b: 0.5686275, a: 1} ---- !u!114 &4079057277140391663 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403984426111160} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 887c8dbd7b891004dbddaf2d9f439564, type: 3} - m_Name: - m_EditorClassIdentifier: - _handGrabInteractor: {fileID: 5995403984426111157} - _handMaterialPropertyBlockEditor: {fileID: 8031081105206769665} - _glowLerpSpeed: 2 - _glowColorLerpSpeed: 4 - _fingerGlowColorWithInteractable: {r: 1, g: 0.81960785, b: 0.4509804, a: 1} - _fingerGlowColorWithNoInteractable: {r: 0.43921572, g: 0.56078434, b: 0.5686275, a: 1} - _fingerGlowColorHover: {r: 0.4392157, g: 0.56078434, b: 0.5686275, a: 1} --- !u!1001 &4278510351509932741 PrefabInstance: m_ObjectHideFlags: 0 @@ -6020,12 +5964,28 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1001 &5995403983838753882 +--- !u!4 &6283017271053987647 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 56446599384029369} + 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: 2083264274152527379} + m_Father: {fileID: 4599451751388988522} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &6317425749520956407 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 8031081105206769676} + m_TransformParent: {fileID: 419586345} m_Modifications: - target: {fileID: 4977421493488092299, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} propertyPath: m_IsActive @@ -6034,7 +5994,7 @@ PrefabInstance: - target: {fileID: 5346183831593185114, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} propertyPath: _hand value: - objectReference: {fileID: 8031081105206769672} + objectReference: {fileID: 629019731} - target: {fileID: 5419937293532398298, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} propertyPath: m_Name value: HandPokeInteractor @@ -6083,808 +6043,194 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 5419937294994736469, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + propertyPath: _offset.x + value: 0.017 + objectReference: {fileID: 0} - target: {fileID: 5903181773383361112, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} propertyPath: _syntheticHand value: - objectReference: {fileID: 8031081105206769671} + objectReference: {fileID: 1120493996} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} ---- !u!114 &5995403983838753883 stripped +--- !u!4 &6353345792372637795 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7238181000868289979} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 3, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2083264274152527379} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6982256495173131784 MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 482801000701448007, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - m_PrefabInstance: {fileID: 5995403983838753882} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} + m_GameObject: {fileID: 1906421920} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d952c175ec3c6554199fd744548ce50a, type: 3} + m_Script: {fileID: 11500000, guid: 932aa90fceecb0c4f8f4f94f0497f6bf, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1001 &5995403984063988192 + _hand: {fileID: 1906421922} + _cameraRig: {fileID: 2075359725} + _handsAreOffset: 0 +--- !u!1 &7238181000868289979 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6353345792372637795} + - component: {fileID: 3191048385164169235} + - component: {fileID: 1635440778198688041} + - component: {fileID: 14395243314071429} + - component: {fileID: 8905235929413409984} + m_Layer: 0 + m_Name: ButtonPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8202483322466269028 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2013890612595530299} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.1, z: 0.015} + m_LocalScale: {x: 0.206, y: 0.2, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2557016926254396389} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &8440234161767868262 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3309464595883382497} + 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!1001 &8505535045765685074 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 8031081105206769675} + m_TransformParent: {fileID: 391734554} m_Modifications: - - target: {fileID: 4977421493488092299, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5346183831593185114, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: _hand - value: - objectReference: {fileID: 8031081105206769667} - - target: {fileID: 5419937293532398298, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414314, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_Name - value: HandPokeInteractor + value: LeftHandSynthetic objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_RootOrder - value: 0 + value: 2 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 5419937294994736469, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: _offset.x - value: 0.017 + - target: {fileID: 2143258138932893620, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} + propertyPath: m_IsActive + value: 1 objectReference: {fileID: 0} - - target: {fileID: 5903181773383361112, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} + - target: {fileID: 2143258140177466423, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} propertyPath: m_Enabled value: 1 objectReference: {fileID: 0} - - target: {fileID: 5903181773383361112, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: _syntheticHand + - target: {fileID: 8592730055715483824, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} + propertyPath: _iModifyDataFromSourceMono value: - objectReference: {fileID: 8031081105206769666} + objectReference: {fileID: 1289915232} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} ---- !u!114 &5995403984063988193 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 482801000701448007, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - m_PrefabInstance: {fileID: 5995403984063988192} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d952c175ec3c6554199fd744548ce50a, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &5995403984426111156 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 8031081105206769675} - m_Modifications: - - target: {fileID: 479229220, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _rotation.w - value: 0.7366965 - objectReference: {fileID: 0} - - target: {fileID: 479229220, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _rotation.x - value: 0.105225 - objectReference: {fileID: 0} - - target: {fileID: 479229220, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _rotation.y - value: -0.6678412 - objectReference: {fileID: 0} - - target: {fileID: 479229220, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _rotation.z - value: 0.013933297 - objectReference: {fileID: 0} - - target: {fileID: 2781004746544239580, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771837, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_Name - value: HandGrabInteractor - objectReference: {fileID: 0} - - target: {fileID: 6141351533274568304, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _syntheticHand - value: - objectReference: {fileID: 8031081105206769666} - - target: {fileID: 8646129326984794350, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _hand - value: - objectReference: {fileID: 8031081105206769667} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} ---- !u!114 &5995403984426111157 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8553364197529364881, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403984426111156} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403984426111160} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9067480af55f5874d8f613b16812f968, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &5995403984426111158 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2165145697951878349, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403984426111156} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403984426111159} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ae43f25c06eb2d9408a201216b4c3ed7, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &5995403984426111159 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 5274135674856270696, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403984426111156} - m_PrefabAsset: {fileID: 0} ---- !u!1 &5995403984426111160 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 3282029263655771837, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403984426111156} - m_PrefabAsset: {fileID: 0} ---- !u!1001 &5995403985441543723 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 8031081105206769676} - m_Modifications: - - target: {fileID: 2781004746544239580, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771826, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3282029263655771837, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: m_Name - value: HandGrabInteractor - objectReference: {fileID: 0} - - target: {fileID: 6141351533274568304, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _syntheticHand - value: - objectReference: {fileID: 8031081105206769671} - - target: {fileID: 8646129326984794350, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - propertyPath: _hand - value: - objectReference: {fileID: 8031081105206769672} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} ---- !u!114 &5995403985441543724 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8553364197529364881, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403985441543723} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403985441543727} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9067480af55f5874d8f613b16812f968, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &5995403985441543725 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2165145697951878349, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403985441543723} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403985441543726} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ae43f25c06eb2d9408a201216b4c3ed7, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &5995403985441543726 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 5274135674856270696, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403985441543723} - m_PrefabAsset: {fileID: 0} ---- !u!1 &5995403985441543727 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 3282029263655771837, guid: 885ecae56b16f13428a67de5ae482a72, type: 3} - m_PrefabInstance: {fileID: 5995403985441543723} - m_PrefabAsset: {fileID: 0} ---- !u!4 &6283017271053987647 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 56446599384029369} - 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: 2083264274152527379} - m_Father: {fileID: 4599451751388988522} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &6317425749520956407 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 419586345} - m_Modifications: - - target: {fileID: 4977421493488092299, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5346183831593185114, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: _hand - value: - objectReference: {fileID: 629019731} - - target: {fileID: 5419937293532398298, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_Name - value: HandPokeInteractor - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5419937293532398301, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5419937294994736469, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: _offset.x - value: 0.017 - objectReference: {fileID: 0} - - target: {fileID: 5903181773383361112, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} - propertyPath: _syntheticHand - value: - objectReference: {fileID: 1120493996} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 424c2298facd2bf419beffd69e8cc855, type: 3} ---- !u!4 &6353345792372637795 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7238181000868289979} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 3, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2083264274152527379} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &6798725408488648837 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403984426111159} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 77279ac005404794d8e29e385f50c9c2, type: 3} - m_Name: - m_EditorClassIdentifier: - _handGrabAPI: {fileID: 5995403984426111158} ---- !u!114 &6982256495173131784 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1906421920} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 932aa90fceecb0c4f8f4f94f0497f6bf, type: 3} - m_Name: - m_EditorClassIdentifier: - _hand: {fileID: 1906421922} - _cameraRig: {fileID: 2075359725} - _handsAreOffset: 0 ---- !u!1 &7238181000868289979 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6353345792372637795} - - component: {fileID: 3191048385164169235} - - component: {fileID: 1635440778198688041} - - component: {fileID: 14395243314071429} - - component: {fileID: 8905235929413409984} - m_Layer: 0 - m_Name: ButtonPanel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1001 &8031081105206769664 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 2063279215} - m_Modifications: - - target: {fileID: 2552751781337300309, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_Name - value: RightControllerHandSynthetic - objectReference: {fileID: 0} - - target: {fileID: 3781269207718660015, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _hmdData - value: - objectReference: {fileID: 0} - - target: {fileID: 3781269207718660015, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _cameraRigRef - value: - objectReference: {fileID: 2063279214} - - target: {fileID: 3781269207718660015, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _trackingToWorldTransformer - value: - objectReference: {fileID: 2063279213} - - target: {fileID: 5679112963091543778, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _interactors.Array.size - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 5679112963091543778, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _interactors.Array.data[0] - value: - objectReference: {fileID: 5995403984063988193} - - target: {fileID: 5679112963091543778, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _interactors.Array.data[1] - value: - objectReference: {fileID: 5995403984426111157} - - target: {fileID: 5679112963574900116, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _interactors.Array.size - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 5679112963574900116, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _interactors.Array.data[0] - value: - objectReference: {fileID: 5995403983838753883} - - target: {fileID: 5679112963574900116, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _interactors.Array.data[1] - value: - objectReference: {fileID: 5995403985441543724} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884800, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5679112963628884801, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_Name - value: OVRControllerHands - objectReference: {fileID: 0} - - target: {fileID: 8445982241883230424, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: m_Name - value: LeftControllerHandSynthentic - objectReference: {fileID: 0} - - target: {fileID: 9205377790416818695, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _hmdData - value: - objectReference: {fileID: 0} - - target: {fileID: 9205377790416818695, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _cameraRigRef - value: - objectReference: {fileID: 2063279214} - - target: {fileID: 9205377790416818695, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - propertyPath: _trackingToWorldTransformer - value: - objectReference: {fileID: 2063279213} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} ---- !u!114 &8031081105206769665 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 6391261505871707229, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5e48d93b64a9ae4f9fd5a728c8f51af, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &8031081105206769666 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 4654031626114267515, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8031081105206769669} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5c67033f580359c4581dff1ccffcca91, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &8031081105206769667 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5679112963636671120, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1a379f34d4f4f2e408d34f14bfb753ce, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &8031081105206769669 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 2552751781337300309, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} ---- !u!114 &8031081105206769670 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8930155292704308951, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5e48d93b64a9ae4f9fd5a728c8f51af, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &8031081105206769671 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 478320840234885314, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8031081105206769674} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5c67033f580359c4581dff1ccffcca91, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &8031081105206769672 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5679112963167615785, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1a379f34d4f4f2e408d34f14bfb753ce, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &8031081105206769674 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 8445982241883230424, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} ---- !u!4 &8031081105206769675 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 5679112963091543779, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} ---- !u!4 &8031081105206769676 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 5679112963574900117, guid: 4c0ee7a14e52ba544b89c2f777670cca, type: 3} - m_PrefabInstance: {fileID: 8031081105206769664} - m_PrefabAsset: {fileID: 0} ---- !u!4 &8202483322466269028 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2013890612595530299} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.1, z: 0.015} - m_LocalScale: {x: 0.206, y: 0.2, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2557016926254396389} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &8440234161767868262 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3309464595883382497} - 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!1001 &8505535045765685074 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 391734554} - m_Modifications: - - target: {fileID: 336358375985414314, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_Name - value: LeftHandSynthetic - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 336358375985414315, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2143258138932893620, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2143258140177466423, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8592730055715483824, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} - propertyPath: _iModifyDataFromSourceMono - value: - objectReference: {fileID: 1289915232} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} ---- !u!1 &8669358150443712908 -GameObject: + m_SourcePrefab: {fileID: 100100000, guid: e7fbb376593cff24f9db4ecf8d465aaf, type: 3} +--- !u!1 &8669358150443712908 +GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -7120,19 +6466,6 @@ MonoBehaviour: m_PostInfinity: 2 m_RotationOrder: 4 ColorTime: 0.1 ---- !u!114 &9043436930505388500 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5995403985441543726} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 77279ac005404794d8e29e385f50c9c2, type: 3} - m_Name: - m_EditorClassIdentifier: - _handGrabAPI: {fileID: 5995403985441543725} --- !u!1001 &9046911637164694215 PrefabInstance: m_ObjectHideFlags: 0 @@ -7170,7 +6503,7 @@ PrefabInstance: objectReference: {fileID: 1449796210} - target: {fileID: 4869577802921675287, guid: ea16c3c8c1688234fa81a4f39339bf1b, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 4869577802921675287, guid: ea16c3c8c1688234fa81a4f39339bf1b, type: 3} propertyPath: m_LocalPosition.x From 8fd028b79fcf54695dbd65a560b8263389385176 Mon Sep 17 00:00:00 2001 From: Sarah Misetich Date: Tue, 24 Sep 2024 12:54:02 -0700 Subject: [PATCH 2/9] perf(Runtime): Performance for BoneVisualizer improvement in Fullbody Debug Lines Summary: Changed FindBoneTransformFromSkeleton param OVRSkeleton.BoneId to int to prevent performance cost of casting currentBone int to BoneId Reviewed By: sohailshafiiWk Differential Revision: D62891133 fbshipit-source-id: 3a644a840588bcab503b7dd1f7f515d770118b4c --- Runtime/Scripts/AnimationRigging/RiggingUtilities.cs | 4 ++-- Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs | 6 +++--- Runtime/Scripts/Utils/OVRSkeletonBoneVisualizer.cs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs b/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs index d2d93281..183f9424 100644 --- a/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs +++ b/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs @@ -59,7 +59,7 @@ public static Transform FindBoneTransformFromCustomSkeleton( /// Bone transform. public static Transform FindBoneTransformFromSkeleton( OVRSkeleton skeleton, - OVRSkeleton.BoneId boneId, + int boneId, bool isBindPose = false) { if (!skeleton.IsInitialized || @@ -71,7 +71,7 @@ public static Transform FindBoneTransformFromSkeleton( var bones = isBindPose ? skeleton.BindPoses : skeleton.Bones; for (int boneIndex = 0; boneIndex < bones.Count; boneIndex++) { - if (bones[boneIndex].Id == boneId) + if (boneIndex == boneId) { return bones[boneIndex].Transform; } diff --git a/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs b/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs index 1be55362..5a08cc99 100644 --- a/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs +++ b/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs @@ -69,7 +69,7 @@ protected override BoneTuple GetBoneTuple(int currentBone) protected override Transform GetBoneTransform(int currentBone) { return RiggingUtilities.FindBoneTransformFromSkeleton(_ovrSkeletonComp, - (OVRSkeleton.BoneId)currentBone, _visualizeBindPose); + currentBone, _visualizeBindPose); } /// @@ -84,12 +84,12 @@ protected override bool TryGetBoneTransforms(BoneTuple tupleItem, firstJoint = RiggingUtilities.FindBoneTransformFromSkeleton( _ovrSkeletonComp, - (OVRSkeleton.BoneId)tupleItem.FirstBoneId, + tupleItem.FirstBoneId, _visualizeBindPose); secondJoint = (tupleItem.SecondBoneId >= (int)OVRHumanBodyBonesMappings.FullBodyTrackingBoneId.FullBody_End) ? firstJoint.GetChild(0) : RiggingUtilities.FindBoneTransformFromSkeleton(_ovrSkeletonComp, - (OVRSkeleton.BoneId)tupleItem.SecondBoneId, _visualizeBindPose); + tupleItem.SecondBoneId, _visualizeBindPose); return true; } diff --git a/Runtime/Scripts/Utils/OVRSkeletonBoneVisualizer.cs b/Runtime/Scripts/Utils/OVRSkeletonBoneVisualizer.cs index 9b4c262c..f4d89f7e 100644 --- a/Runtime/Scripts/Utils/OVRSkeletonBoneVisualizer.cs +++ b/Runtime/Scripts/Utils/OVRSkeletonBoneVisualizer.cs @@ -57,7 +57,7 @@ protected override BoneTuple GetBoneTuple(int currentBone) protected override Transform GetBoneTransform(int currentBone) { return RiggingUtilities.FindBoneTransformFromSkeleton(_ovrSkeletonComp, - (OVRSkeleton.BoneId)currentBone, _visualizeBindPose); + currentBone, _visualizeBindPose); } /// @@ -71,12 +71,12 @@ protected override bool TryGetBoneTransforms(BoneTuple tupleItem, } firstJoint = RiggingUtilities.FindBoneTransformFromSkeleton( _ovrSkeletonComp, - (OVRSkeleton.BoneId)tupleItem.FirstBoneId, + tupleItem.FirstBoneId, _visualizeBindPose); secondJoint = (tupleItem.SecondBoneId >= (int)OVRHumanBodyBonesMappings.BodyTrackingBoneId.Body_End) ? firstJoint.GetChild(0) : RiggingUtilities.FindBoneTransformFromSkeleton(_ovrSkeletonComp, - (OVRSkeleton.BoneId)tupleItem.SecondBoneId, _visualizeBindPose); + tupleItem.SecondBoneId, _visualizeBindPose); return true; } From ba2775753147ce20eae6ee9d5a4fef82d8bc627a Mon Sep 17 00:00:00 2001 From: Sarah Misetich Date: Tue, 24 Sep 2024 12:54:02 -0700 Subject: [PATCH 3/9] perf(Runtime): Removed Garbage To Improve Full Body Debug Lines Performance Summary: Added _boneTypeToInt in BoneVisualizer.cs to populate on initialization to avoid casting during runtime whenever we need to access the int of the BoneType. Some cleanup on FullBodyOVRSkeletonBoneVisualizer.cs as it casts between int and OVRSkeleton.BoneId frequently Removed unnecessary loop on RiggingUtilities.cs Reviewed By: andkim-meta, sohailshafiiWk Differential Revision: D63148076 fbshipit-source-id: f80cbfba330d23c8fcc9a620a34d26228f809de6 --- .../AnimationRigging/RiggingUtilities.cs | 10 ++----- Runtime/Scripts/Utils/BoneVisualizer.cs | 29 +++++++++++++++---- .../FullBodyOVRSkeletonBoneVisualizer.cs | 17 ++++++----- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs b/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs index 183f9424..20a8b186 100644 --- a/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs +++ b/Runtime/Scripts/AnimationRigging/RiggingUtilities.cs @@ -69,14 +69,8 @@ public static Transform FindBoneTransformFromSkeleton( } var bones = isBindPose ? skeleton.BindPoses : skeleton.Bones; - for (int boneIndex = 0; boneIndex < bones.Count; boneIndex++) - { - if (boneIndex == boneId) - { - return bones[boneIndex].Transform; - } - } - return null; + + return bones[boneId].Transform; } /// diff --git a/Runtime/Scripts/Utils/BoneVisualizer.cs b/Runtime/Scripts/Utils/BoneVisualizer.cs index 3b4f0ab4..af6e048c 100644 --- a/Runtime/Scripts/Utils/BoneVisualizer.cs +++ b/Runtime/Scripts/Utils/BoneVisualizer.cs @@ -168,7 +168,7 @@ public virtual void ProcessSkeleton(OVRSkeleton skeleton) /// Allows visualizing bones found in an OVRSkeleton or Animator component. /// should be an enum that maps to bone IDs. /// - public abstract class BoneVisualizer : BoneVisualizer + public abstract class BoneVisualizer : BoneVisualizer where BoneType : Enum { /// /// Bone tuple class: pair of bone joint IDs that define a bone @@ -176,6 +176,7 @@ public abstract class BoneVisualizer : BoneVisualizer [Serializable] public class BoneTuple { + /// /// First bone in tuple. /// @@ -189,14 +190,19 @@ public class BoneTuple /// public bool Hide; + /// + /// Dictionary with BoneType and int to initialize + /// + private static readonly Dictionary _boneTypeToInt = new Dictionary(); + /// /// as an Integer, which simplifies code /// when the bone index is ambiguous /// public int FirstBoneId { - get => (int)(object)FirstBone; - set => FirstBone = (BoneType)(object)value; + get => _boneTypeToInt[FirstBone]; + set => _boneTypeToInt[FirstBone] = value; } /// @@ -205,8 +211,21 @@ public int FirstBoneId /// public int SecondBoneId { - get => (int)(object)SecondBone; - set => SecondBone = (BoneType)(object)value; + get => _boneTypeToInt[SecondBone]; + set => _boneTypeToInt[SecondBone] = value; + } + + /// + /// Populating + /// + static BoneTuple() + { + _boneTypeToInt = new Dictionary(); + foreach (BoneType bone in Enum.GetValues(typeof(BoneType))) + { + int intVal = Convert.ToInt32(bone); + _boneTypeToInt[bone] = intVal; + } } /// diff --git a/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs b/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs index 5a08cc99..a7a67fdf 100644 --- a/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs +++ b/Runtime/Scripts/Utils/FullBodyOVRSkeletonBoneVisualizer.cs @@ -50,18 +50,19 @@ protected override int GetBoneCount() protected override BoneTuple GetBoneTuple(int currentBone) { // avoid visualizing root to hips, since we have legs now - if ((OVRSkeleton.BoneId)currentBone == OVRSkeleton.BoneId.FullBody_Root) + var currentBoneId = (OVRSkeleton.BoneId)currentBone; + if (currentBoneId == OVRSkeleton.BoneId.FullBody_Root) { - currentBone = (int)OVRSkeleton.BoneId.FullBody_Hips; + currentBoneId = OVRSkeleton.BoneId.FullBody_Hips; } // TODO: figure out how to visualize twist joints in foot, // OVRHumanBodeBonesMapping does not have it right now - if (!OVRHumanBodyBonesMappings.FullBoneIdToJointPair.ContainsKey((OVRSkeleton.BoneId)currentBone)) + if (!OVRHumanBodyBonesMappings.FullBoneIdToJointPair.ContainsKey(currentBoneId)) { - currentBone = (int)OVRSkeleton.BoneId.FullBody_Hips; + currentBoneId = OVRSkeleton.BoneId.FullBody_Hips; } - var boneTuple = OVRHumanBodyBonesMappings.FullBoneIdToJointPair[(OVRSkeleton.BoneId)currentBone]; + var boneTuple = OVRHumanBodyBonesMappings.FullBoneIdToJointPair[currentBoneId]; return new BoneTuple((int)boneTuple.Item1, (int)boneTuple.Item2); } @@ -81,12 +82,14 @@ protected override bool TryGetBoneTransforms(BoneTuple tupleItem, firstJoint = secondJoint = null; return false; } - firstJoint = RiggingUtilities.FindBoneTransformFromSkeleton( _ovrSkeletonComp, tupleItem.FirstBoneId, _visualizeBindPose); - secondJoint = (tupleItem.SecondBoneId >= (int)OVRHumanBodyBonesMappings.FullBodyTrackingBoneId.FullBody_End) + + bool secondJointInvalid = tupleItem.SecondBone >= OVRHumanBodyBonesMappings.FullBodyTrackingBoneId.FullBody_End; + + secondJoint = secondJointInvalid ? firstJoint.GetChild(0) : RiggingUtilities.FindBoneTransformFromSkeleton(_ovrSkeletonComp, tupleItem.SecondBoneId, _visualizeBindPose); From a9456d89fa30e3a01dd14d41497ab0f08020bce9 Mon Sep 17 00:00:00 2001 From: Sohail Shafii Date: Tue, 24 Sep 2024 17:47:59 -0700 Subject: [PATCH 4/9] feat(Runtime): HMD remount+restart tracking logic Summary: This adds a script that allows users to optionally restart body tracking after the HMD is unmounted and remounted. This is not a required script but something that could mitigate body tracking errors encountered after the HMD is remounted. Reviewed By: andkim-meta Differential Revision: D63289559 fbshipit-source-id: 5895ff362e09ea6478982bcdf80fab7f550b96e0 --- .../Body/HMDRemountRestartTracking.cs | 65 +++++++++++++++++++ .../Body/HMDRemountRestartTracking.cs.meta | 11 ++++ 2 files changed, 76 insertions(+) create mode 100644 Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs create mode 100644 Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs.meta diff --git a/Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs b/Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs new file mode 100644 index 00000000..7e78ed7a --- /dev/null +++ b/Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs @@ -0,0 +1,65 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. + +using UnityEngine; + +namespace Oculus.Movement.Tracking +{ + /// + /// Allows restarting tracking after the HMD is unmounted and remounted. + /// This can be used to resolve body tracking errors that might be seen after + /// remounting the HMD. + /// + public class HMDRemountRestartTracking : MonoBehaviour + { + private bool _wasUnmountedBefore = false; + + private void Start() + { + OVRManager.HMDMounted += HandleHMDMounted; + OVRManager.HMDUnmounted += HandleHMDUnmounted; + } + + private void OnDestroy() + { + OVRManager.HMDMounted -= HandleHMDMounted; + OVRManager.HMDUnmounted -= HandleHMDUnmounted; + } + + private void HandleHMDMounted() + { + // If the HMD was removed before a mount event, attempt a reboot of tracking. + // Otherwise, don't bother. + if (!_wasUnmountedBefore) + { + return; + } + + Debug.Log("Rebooting body tracking after HMD remounted. Stopping..."); + OVRPlugin.StopBodyTracking(); + + Debug.Log("Starting body tracking."); + OVRPlugin.BodyJointSet currentJointSet = + OVRRuntimeSettings.GetRuntimeSettings().BodyTrackingJointSet; + if (!OVRPlugin.StartBodyTracking2(currentJointSet)) + { + Debug.LogWarning( + $"Failed to start body tracking with joint set {currentJointSet} after remounting HMD."); + } + + OVRPlugin.BodyTrackingFidelity2 currentFidelity = + OVRRuntimeSettings.GetRuntimeSettings().BodyTrackingFidelity; + bool fidelityChangeSuccessful = OVRPlugin.RequestBodyTrackingFidelity(currentFidelity); + if (!fidelityChangeSuccessful) + { + Debug.LogWarning($"Failed to set Body Tracking fidelity to: {currentFidelity} after remounting HMD."); + } + + _wasUnmountedBefore = false; + } + + private void HandleHMDUnmounted() + { + _wasUnmountedBefore = true; + } + } +} diff --git a/Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs.meta b/Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs.meta new file mode 100644 index 00000000..1fb8390c --- /dev/null +++ b/Runtime/Scripts/Tracking/Body/HMDRemountRestartTracking.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0731c7bdf6b015e49807c660a82b2aa1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 9fc354407834c48bfe076b2884ad24398ee61f3f Mon Sep 17 00:00:00 2001 From: Sohail Shafii Date: Tue, 1 Oct 2024 10:35:11 -0700 Subject: [PATCH 5/9] feat(editor): Build samples menu Summary: Creates a menu to build samples. Only the samples that have been imported into `Assets` can be built. Fixed bad function name in `ProjectValidation`. Added code that prevents loading a scene if it has not been added to the build. Reviewed By: andkim-meta Differential Revision: D63666570 fbshipit-source-id: f010cef313ec45ec8513b2933b9f04913fe78a9d --- Editor/Utils/GenerateBuild.cs | 158 +++++++++++++++++++ Editor/Utils/GenerateBuild.cs.meta | 11 ++ Editor/Utils/ProjectValidation.cs | 4 +- Runtime/Scripts/Utils/MovementSceneLoader.cs | 6 + 4 files changed, 176 insertions(+), 3 deletions(-) create mode 100644 Editor/Utils/GenerateBuild.cs create mode 100644 Editor/Utils/GenerateBuild.cs.meta diff --git a/Editor/Utils/GenerateBuild.cs b/Editor/Utils/GenerateBuild.cs new file mode 100644 index 00000000..ede9d664 --- /dev/null +++ b/Editor/Utils/GenerateBuild.cs @@ -0,0 +1,158 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. + +using System; +using System.Collections.Generic; +using System.IO; +using UnityEditor; +using UnityEngine; + +namespace Oculus.Movement.Utils +{ + /// + /// This class contains useful menus used for generating sample builds. + /// + public class GenerateBuild + { + private static readonly string[] _sceneNames = + new string[] { + "t:scene, MovementAura", + "t:scene, MovementBlendshapeMappingExample", + "t:scene, MovementHighFidelity", + "t:scene, MovementRetargeting", + "t:scene, MovementBodyTrackingForFitness", + "t:scene, MovementHipPinning", + "t:scene, MovementISDKIntegration", + "t:scene, MovementLocomotion" + }; + + private const string _MAIN_BUILD_NAME = "movement"; + + /// + /// Builds an APK with as many samples as possible, depending on whether or not + /// those samples have been imported into the Assets folder or not. + /// + [MenuItem("Movement/Build Samples APK", priority = 100)] + public static void CreateSamplesBuildAPK() + { + List validScenePaths = new List(); + foreach (string sceneName in _sceneNames) + { + var scenePath = PathOfAssetInAssetsFolder(sceneName); + if (scenePath != String.Empty) + { + validScenePaths.Add(scenePath); + } + } + + if (validScenePaths.Count == 0) + { + Debug.LogError($"No samples scenes have been imported; cannot build."); + return; + } + + GenerateAndroidBuild(validScenePaths.ToArray(), _MAIN_BUILD_NAME, + "MovementSDK Samples", false); + } + + private static string PathOfAssetInAssetsFolder(string assetName) + { + string[] guids = + AssetDatabase.FindAssets(assetName, new string[] { "Assets" }); + if (guids.Length == 0) + { + return String.Empty; + } + return AssetDatabase.GUIDToAssetPath(guids[0]); + } + + private static void GenerateAndroidBuild(string[] buildScenes, string buildName, + string productName, bool exitAfterBuild = true) + { + string previousAppIdentifier = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android); + string previousProductName = PlayerSettings.productName; + string targetAppId = "com.meta." + buildName; + PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, targetAppId); + PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64; + PlayerSettings.SetScriptingBackend(BuildTargetGroup.Android, ScriptingImplementation.IL2CPP); + bool prevForceSDCardPerm = PlayerSettings.Android.forceSDCardPermission; + PlayerSettings.Android.forceSDCardPermission = false; + PlayerSettings.productName = productName; + BuildPlayerOptions buildOptions = new BuildPlayerOptions() + { + locationPathName = string.Format("builds/{0}.apk", buildName), + scenes = buildScenes, + target = BuildTarget.Android, + targetGroup = BuildTargetGroup.Android, + }; + buildOptions.options = new BuildOptions(); + + try + { + var error = BuildPipeline.BuildPlayer(buildOptions); + RestorePreviousSettings(previousAppIdentifier, previousProductName, prevForceSDCardPerm); + HandleBuildErrors.Check(error, exitAfterBuild, buildScenes); + } + catch + { + Debug.Log("Exception while building: exiting with exit code 2"); + RestorePreviousSettings(previousAppIdentifier, previousProductName, prevForceSDCardPerm); + EditorApplication.Exit(2); + } + } + + private static void RestorePreviousSettings(string previousAppIdentifier, string previousProductName, + bool prevForceSDCardPerm) + { + PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, previousAppIdentifier); + PlayerSettings.productName = previousProductName; + PlayerSettings.Android.forceSDCardPermission = prevForceSDCardPerm; + } + } + + /// + /// Handles errors after build process. This can be used to catch the edge case where + /// builds don't actually succeed even if they are marked as doing so. + /// + public static class HandleBuildErrors + { + /// + /// Check for build error edge cases. + /// + /// Build report. + /// If we need to exit after the build or not. + /// Scenes built. + public static void Check(UnityEditor.Build.Reporting.BuildReport buildReport, bool exitAfterBuild, + string[] scenesBuilt) + { + bool buildSucceeded = + buildReport.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded; + if (buildReport.summary.platform == BuildTarget.Android) + { + // Android can fail to produce the output even if the build is marked as succeeded in some rare + // scenarios, notably if the Unity directory is read-only. This should be handled. + buildSucceeded = buildSucceeded && File.Exists(buildReport.summary.outputPath); + } + if (buildSucceeded) + { + foreach (var scene in scenesBuilt) + { + Debug.Log($"Built scene {scene}."); + } + Debug.Log("Exiting with code 0. Success."); + + if (exitAfterBuild) + { + EditorApplication.Exit(0); + } + } + else + { + Debug.Log("Exiting with code 1. Failure."); + if (exitAfterBuild) + { + EditorApplication.Exit(1); + } + } + } + } +} diff --git a/Editor/Utils/GenerateBuild.cs.meta b/Editor/Utils/GenerateBuild.cs.meta new file mode 100644 index 00000000..4042c83c --- /dev/null +++ b/Editor/Utils/GenerateBuild.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 990b9815efe68934a8f711a04de9b4f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Utils/ProjectValidation.cs b/Editor/Utils/ProjectValidation.cs index 4597be18..6068f227 100644 --- a/Editor/Utils/ProjectValidation.cs +++ b/Editor/Utils/ProjectValidation.cs @@ -1,8 +1,6 @@ // Copyright (c) Meta Platforms, Inc. and affiliates. using UnityEditor; -using UnityEngine; -using UnityEngine.SceneManagement; namespace Oculus.Movement.Utils { @@ -13,7 +11,7 @@ namespace Oculus.Movement.Utils public class ProjectValidation { [MenuItem("Movement/Check Project Settings", priority = 100)] - public static void BuildProjectAndroid64() + public static void CheckProjectSettings() { ProjectSettingsValidationWindow.ShowProjectSettingsValidationWindow(); } diff --git a/Runtime/Scripts/Utils/MovementSceneLoader.cs b/Runtime/Scripts/Utils/MovementSceneLoader.cs index e0ca4ad8..bb454a4f 100644 --- a/Runtime/Scripts/Utils/MovementSceneLoader.cs +++ b/Runtime/Scripts/Utils/MovementSceneLoader.cs @@ -32,6 +32,12 @@ public class MovementSceneLoader : MonoBehaviour /// The name of the scene to load. public void Load(string sceneName) { + if (SceneUtility.GetBuildIndexByScenePath(sceneName) == -1) + { + Debug.LogError($"Could not load {sceneName}, did you build with it?"); + return; + } + if (_loading) { return; From 1688590b83e085c5470959b359140041ca0f9ad3 Mon Sep 17 00:00:00 2001 From: Andrew Kim Date: Wed, 2 Oct 2024 11:31:08 -0700 Subject: [PATCH 6/9] feat(Editor): Remove unused duplicate face quick action Summary: In the available quick actions for Face Tracking, there is currently an option to setup the face with duplicates. This is unused in the samples, and isn't recommended in the majority of cases. Reviewed By: sohailshafiiWk Differential Revision: D63770386 fbshipit-source-id: 08cefd53bb6c62722a4c111b03bce6618d8d191f --- Editor/Utils/HelperMenusFace.cs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Editor/Utils/HelperMenusFace.cs b/Editor/Utils/HelperMenusFace.cs index af0f5a03..2de5da15 100644 --- a/Editor/Utils/HelperMenusFace.cs +++ b/Editor/Utils/HelperMenusFace.cs @@ -15,20 +15,9 @@ internal static class HelperMenusFace "Correctives Face"; private const string _ARKIT_FACE_MENU = "ARKit Face"; - private const string _NO_DUPLICATES_SUFFIX = - " (duplicate mapping off)"; [MenuItem(AddComponentsHelper._MOVEMENT_SAMPLES_MENU + _MOVEMENT_SAMPLES_FT_MENU + _CORRECTIVES_FACE_MENU)] - private static void SetupCharacterForCorrectivesFace() - { - var activeGameObject = Selection.activeGameObject; - - AddComponentsHelper.SetUpCharacterForCorrectivesFace(activeGameObject, true); - } - - [MenuItem(AddComponentsHelper._MOVEMENT_SAMPLES_MENU + _MOVEMENT_SAMPLES_FT_MENU + - _CORRECTIVES_FACE_MENU + _NO_DUPLICATES_SUFFIX)] private static void SetupCharacterForCorrectivesFaceNoDuplicates() { var activeGameObject = Selection.activeGameObject; @@ -37,15 +26,6 @@ private static void SetupCharacterForCorrectivesFaceNoDuplicates() } [MenuItem(AddComponentsHelper._MOVEMENT_SAMPLES_MENU + _MOVEMENT_SAMPLES_FT_MENU + _ARKIT_FACE_MENU)] - private static void SetupCharacterForARKitFace() - { - var activeGameObject = Selection.activeGameObject; - - AddComponentsHelper.SetUpCharacterForARKitFace(activeGameObject, true); - } - - [MenuItem(AddComponentsHelper._MOVEMENT_SAMPLES_MENU + _MOVEMENT_SAMPLES_FT_MENU + _ARKIT_FACE_MENU - + _NO_DUPLICATES_SUFFIX)] private static void SetupCharacterForARKitFaceNoDuplicates() { var activeGameObject = Selection.activeGameObject; From 9117605da94edff280c6dc1a20c005eaa81320e9 Mon Sep 17 00:00:00 2001 From: Andrew Kim Date: Wed, 2 Oct 2024 12:37:36 -0700 Subject: [PATCH 7/9] fix(Editor): Fix FaceExpressionModifierDrawer call to GUI restricted properties on constructor Summary: Fix FaceExpressionModifierDrawer constructor call to GUI restricted properties (GUI.skin.label) outside of OnGUI, which can result in errors based on the race condition of the constructor running before OnGUI. Reviewed By: sohailshafiiWk Differential Revision: D63775589 fbshipit-source-id: c3e651bfa12ceae54c0d3e74edaa9799dedf2e72 --- Editor/Tracking/FaceExpressionModifierDrawer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/Tracking/FaceExpressionModifierDrawer.cs b/Editor/Tracking/FaceExpressionModifierDrawer.cs index 2619684a..1ed585ad 100644 --- a/Editor/Tracking/FaceExpressionModifierDrawer.cs +++ b/Editor/Tracking/FaceExpressionModifierDrawer.cs @@ -39,8 +39,6 @@ public class FaceExpressionModifierDrawer : PropertyDrawer /// public FaceExpressionModifierDrawer() { - _labelWidth = Math.Max(_labelStyle.CalcSize(_multLabel).x, _labelStyle.CalcSize(_clmpLabel).x); - List blendshapeNameList = new List(); foreach (string e in Enum.GetNames(typeof(OVRFaceExpressions.FaceExpression))) { @@ -66,6 +64,8 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent /// public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label) { + _labelWidth = Math.Max(_labelStyle.CalcSize(_multLabel).x, _labelStyle.CalcSize(_clmpLabel).x); + var faceExpressionsProp = property.FindPropertyRelative( nameof(BlendshapeModifier.FaceExpressionModifier.FaceExpressions)); From bf42c3df865cb029de81d57b58d41e9c47abfc66 Mon Sep 17 00:00:00 2001 From: Andrew Kim Date: Thu, 3 Oct 2024 17:18:20 -0700 Subject: [PATCH 8/9] ci: Update github release scripts Summary: Update github release scripts. Reviewed By: sohailshafiiWk Differential Revision: D63870143 fbshipit-source-id: d467d7aece008e32a5c3dd8e28de8ddf2a51b2e5 --- .github/workflows/cleanup.yml | 4 +-- .github/workflows/merge.yml | 5 --- .github/workflows/release.yml | 57 +++++++++++++++++++++++++---------- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 1e99d290..5dcf6727 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -21,10 +21,8 @@ jobs: run: | git pull git merge --allow-unrelated-histories $(git commit-tree -p main -m "[Automated] Cleanup" origin/dev^{tree}) - - name: Use CHANGELOG and package.json from main + - name: Rename Samples folder run: | - git checkout HEAD~1 CHANGELOG.md - git checkout HEAD~1 package.json git rm Samples.meta git mv Samples Samples~ git commit --amend --no-edit --allow-empty diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 2f4873fd..a50f47aa 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,11 +21,6 @@ jobs: run: | git pull git merge --no-ff --allow-unrelated-histories -X theirs origin/dev -m "[Automated] Merged dev into main" - - name: Use CHANGELOG and package.json from main - run: | - git checkout HEAD~1 CHANGELOG.md - git checkout HEAD~1 package.json - git commit --amend --no-edit - name: Push run: | git push diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 298be6ce..550a2b85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,24 +14,49 @@ jobs: name: Release runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout Repository uses: actions/checkout@v3 - - name: Pull latest - run: | - git pull - - name: Setup Node + - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 14 - - name: Semantic Release - uses: cycjimmy/semantic-release-action@v3 - with: - semantic_version: 19 - branch: main - extra_plugins: | - @semantic-release/changelog - @semantic-release/npm - @semantic-release/git + node-version: '14' + - name: Extract Version from package.json + id: package_version + run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV + - name: Create Release + id: create_release + uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PROJECT_NAME: Unity-Movement + with: + tag_name: v${{ env.VERSION }} + release_name: v${{ env.VERSION }} + draft: false + prerelease: false + - name: Get Changelog Entry + id: changelog + run: | + VERSION=${{ env.VERSION }} + echo "Looking for changelog entries for version $VERSION" + CHANGELOG=$(awk -v ver="$VERSION" 'BEGIN {RS="## "; FS="\n"} $1 ~ ver {for (i=2; i<=NF; i++) print $i}' CHANGELOG.md) + if [ -z "$CHANGELOG" ]; then + echo "No changelog entry found for version $VERSION" + else + echo "Changelog entry found:" + echo "$CHANGELOG" + fi + echo "CHANGELOG<> $GITHUB_ENV + echo "$CHANGELOG" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - name: Update Release + uses: actions/github-script@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const body = process.env.CHANGELOG; + github.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: ${{ steps.create_release.outputs.id }}, + body: body + }) From e989ed67ba3e4913c70fe9453c41f2361e041ebe Mon Sep 17 00:00:00 2001 From: Sohail Shafii Date: Fri, 11 Oct 2024 11:38:28 -0700 Subject: [PATCH 9/9] docs(runtime): Update CHANGELOG, readme and package.json for v69 release Summary: Updates CHANGELOG (release notes), readme and package.json for v69 release. Reviewed By: allenjl-meta, lkirkbarker Differential Revision: D64193457 fbshipit-source-id: 1b47ebdc8f501b8a9799d62f02b2ded8e33e6693 --- CHANGELOG.md | 21 ++++++++------------- package.json | 8 ++++---- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 857c0782..c0422cca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,8 @@ -## [1.0.1](https://github.com/oculus-samples/Unity-Movement/compare/v1.0.0...v1.0.1) (2022-11-01) - - -### Bug Fixes - -* Update hip pinning chair ([fba7b55](https://github.com/oculus-samples/Unity-Movement/commit/fba7b55784f97cf8e07a87954494153be217adab)) - -# 1.0.0 (2022-11-01) - - -### Features - -* Initial commit ([e24717b](https://github.com/oculus-samples/Unity-Movement/commit/e24717b34ded22112bc94bd079b79c6745e6127c)) +## [69.0.0] + +- Fixed bug in ISDK scene where controllers were not able to be used +- Improved performance and removed garbage creation when drawing the debug skeleton +- Added HMD remount + restart tracking feature via HMDRemountRestartTracking.cs +- Added menu action to build all available samples (Movement/Build Samples APK) +- Remove unused duplicate face quick action +- Fixed FaceExpressionModifierDrawer call to GUI properties on constructor diff --git a/package.json b/package.json index f9ada8c4..85293ce6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.meta.movement", "displayName": "Meta Movement", - "version": "1.0.0", + "version": "69.0.0", "description": "Contains sample scenes, prefabs, scripts, and art assets for Movement SDK.", "unity": "2021.3", "unityRelease": "26f1", @@ -39,9 +39,9 @@ "XR" ], "dependencies": { - "com.meta.xr.sdk.core": "63.0.0", - "com.meta.xr.sdk.interaction": "63.0.0", - "com.meta.xr.sdk.interaction.ovr": "63.0.0", + "com.meta.xr.sdk.core": "67.0.0", + "com.meta.xr.sdk.interaction": "67.0.0", + "com.meta.xr.sdk.interaction.ovr": "67.0.0", "com.unity.textmeshpro": "3.0.6", "com.unity.animation.rigging": "1.2.1", "com.unity.burst": "1.4.1"