diff --git a/.github/latest.md b/.github/latest.md index 312dd04..c917cde 100644 --- a/.github/latest.md +++ b/.github/latest.md @@ -1,9 +1,7 @@ ## Changelog -- ### Added +- ### Updates -- Initial release -- Loader samples with 2 avatar loading sample scenes -- Avatar loader and Movement avatar prefabs -- Editor and runtime scripts to help with avatar loading and meta movement component setup \ No newline at end of file +- README updates +- fixed issue causing error with ARKitFace setup \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b00270..13a9064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.1.0] - 2024.08.15 + +- ### Updates + +- README updates +- fixed issue causing error with ARKitFace setup + ## [0.1.0] - 2024.08.06 ### Added diff --git a/Editor/AvatarBoneMirrorEditor.cs b/Editor/AvatarBoneMirrorEditor.cs index d1873a0..85e5016 100644 --- a/Editor/AvatarBoneMirrorEditor.cs +++ b/Editor/AvatarBoneMirrorEditor.cs @@ -1,4 +1,3 @@ -using ReadyPlayerMe.MetaMovement; using UnityEditor; using UnityEngine; diff --git a/Editor/MetaMovementSetupTool.cs b/Editor/MetaMovementSetupTool.cs index cab39a2..8278d75 100644 --- a/Editor/MetaMovementSetupTool.cs +++ b/Editor/MetaMovementSetupTool.cs @@ -29,7 +29,11 @@ public static void MetaMovementSetup() var restPoseObjectHumanoid = AddComponentsHelper.GetRestPoseObject(AddComponentsHelper.CheckIfTPose(animator)); AnimationUtilities.UpdateToAnimatorPose(animator); HelperMenusBody.SetupCharacterForAnimationRiggingRetargetingConstraints(activeGameObject, restPoseObjectHumanoid, true, true); - MetaMovementHelper.SetLayerRecursively(activeGameObject, LayerMask.NameToLayer(META_CHARACTER_LAYER)); + if(LayerMask.NameToLayer(META_CHARACTER_LAYER) >= 0) + { + MetaMovementHelper.SetLayerRecursively(activeGameObject, LayerMask.NameToLayer(META_CHARACTER_LAYER)); + return; + } SetupFaceTracking(activeGameObject); MetaMovementHelper.SetupHierarchyTwist(activeGameObject); var deformation = activeGameObject.GetComponentInChildren(); @@ -74,7 +78,6 @@ private static void SetupFaceTracking(GameObject activeGameObject) { arkitFaceComponent = mesh.gameObject.AddComponent(); } - arkitFaceComponent.OnBeforeSerialize(); MetaMovementHelper.ApplyARKitFaceSettings(arkitFaceComponent); EditorUtility.SetDirty(arkitFaceComponent); } diff --git a/README.md b/README.md index 3f808b9..d7e45f0 100644 --- a/README.md +++ b/README.md @@ -24,25 +24,26 @@ Please visit the online documentation and join our public `forums` community. https://github.com/readyplayerme/rpm-unity-meta-movement-support.git ``` - Open Unity and go to `Window -> Package Manager -> Add package from git URL` - - ![Screenshot 2024-07-22 081415](~Images/image-package-manager-0.png) + + ![image-package-manager-0](https://github.com/user-attachments/assets/46ff8c13-a203-419d-bb7e-55593caeb9d2) - Paste the URL and click `Add` - -![Screenshot 2024-07-22 081437](~Images/image-package-manager-1.png) + +![image-package-manager-1](https://github.com/user-attachments/assets/b283657d-99a1-4ce8-b5a5-df35ea0edf9b) + ## Importing the Sample 1. Import the sample by going to `Window -> Package Manager -> Ready Player Me Meta Movement Support -> Samples -> Import` - -![Screenshot 2024-07-22 082241](~Images/image-package-manager.png) + +![image-package-manager](https://github.com/user-attachments/assets/6fa27edc-b071-46be-b12c-07f4c4ca86bc) ### Running the Samples in the Editor 1. Open the scene `Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/DynamicLoader` or `Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/PrefabLoader` 2. Connect your Quest device via Quest Link 3. Click on the `Play` button in the Unity Editor + ![image](https://github.com/user-attachments/assets/47d4d0ba-d8f1-457b-bae3-34b738184f5d) - ![Screenshot 2024-07-22 082310](~Images/image-scenes.png) ### Running the Samples on the device 1. Open the scene `Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/DynamicLoader` or `Assets/Samples/Ready Player Me Meta Movement Support/VERSION_NUMBER/LoaderSamples/Scenes/PrefabLoader` @@ -58,16 +59,17 @@ _This assumes that the scene is already set up with the necessary components for 1. With your scene open, drag and drop the `DynamicAvatarLoader` prefab from `Packages/Ready Player Me Meta Movement Support/Runtime/Prefabs` into your scene 3. Select the `DynamicAvatarLoader` object in the scene, then in the inspector, set the `Avatar URL` field in the `LoadUrlOnStart` component to the URL of the avatar you want to load - ![Screenshot 2024-07-22 105848](~Images/image-inspector.png) + ![image-inspector](https://github.com/user-attachments/assets/b81a6dd8-bfd3-41eb-ac5e-afbfe404e361) + -4. Click on the `Play` button in the Unity Editor -5. After a small delay, your avatar will load into the scene +5. Click on the `Play` button in the Unity Editor +6. After a small delay, your avatar will load into the scene ### Loading with AvatarPrefabLoader 1. With your scene open, Drag and drop the `AvatarPrefabLoader` prefab from `Packages/Ready Player Me Meta Movement Support/Runtime/Prefabs` into your scene 2. Select the `AvatarPrefabLoader` object in the scene, then in the inspector, set the `Avatar URL` field in the `LoadUrlOnStart` component to the URL of the avatar you want to load -![Screenshot 2024-07-22 105856](~Images/image-inspector-2.png) +![image-inspector-2](https://github.com/user-attachments/assets/75402fea-dbcf-42de-afe2-62c35a7dc4fe) 3. Click on the `Play` button in the Unity Editor 4. After a small delay, your avatar will load into the scene @@ -78,11 +80,11 @@ Before loading an avatar you need to set the correct avatar config. To do this follow these steps: 1. Open the Ready Player Me Settings window `Tools -> Ready Player Me -> Settings` -![Screenshot 2024-07-22 083005](~Images/image-toolbar.png) +![image-toolbar](https://github.com/user-attachments/assets/b660a227-6117-4ec7-b268-522ebf2fec0e) 2. Set the `Avatar Config` field to `Meta Avatar Config` -![Screenshot 2024-07-22 083024](~Images/image-settings.png) +![image-settings](https://github.com/user-attachments/assets/a6696b77-33fd-4c34-857e-e3cd457e56ea) 3. This will ensure that the avatar is created with the correct settings for Meta Movement and face-tracking @@ -91,7 +93,7 @@ To do this follow these steps: 2. After avatar creation is complete you will get a URL to a .glb, copy that URL. 3. In Unity open the Avatar loader window by going to `Tools -> Ready Player Me -> Avatar Loader` -![Screenshot 2024-07-22 083154](~Images/image-loader.png) +![image-loader](https://github.com/user-attachments/assets/f792901e-0ce3-4722-bbc1-a2d9e1150d16) 4. Paste the URL into the `Avatar URL` field and click `Load Avatar` 5. After a small delay, the avatar should load into the scene as a new GameObject @@ -100,7 +102,7 @@ To do this follow these steps: 1. Select the avatar GameObject and right-click to display the context menu 2. In the context menu, select `Ready Player Me -> Meta Movement -> Run Avatar Setup` -![Screenshot 2024-07-22 083334](~Images/image-inspector-2.png) +![image-inspector-2](https://github.com/user-attachments/assets/c8934d0a-5784-456a-8bb3-e147345bdec7) 3. This should automatically set up the avatar with the correct settings and components including: - Adding a Retargeting Layer component diff --git a/Runtime/Scripts/MetaMovementHelper.cs b/Runtime/Scripts/MetaMovementHelper.cs index 45cd418..3aa7bff 100644 --- a/Runtime/Scripts/MetaMovementHelper.cs +++ b/Runtime/Scripts/MetaMovementHelper.cs @@ -137,7 +137,7 @@ public static void ApplyARKitFaceSettings(ARKitFace arKitFace) Debug.LogError("ARKitFace component is null."); return; } - + arKitFace.RetargetingTypeField = OVRCustomFace.RetargetingType.Custom; arKitFace.AutoMapBlendshapes(); arKitFace.BlendShapeStrengthMultiplier = 1f; diff --git a/package.json b/package.json index ffbd499..12b5b25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.readyplayerme.metamovement", - "version": "0.1.0", + "version": "0.1.1", "displayName": "Ready Player Me Meta Movement Support", "description": "This package provides support for Ready Player Me avatars that use Meta Movement SDK.", "unity": "2021.3", @@ -13,7 +13,8 @@ "keywords": [ "meta", "avatar", - "vr" + "vr", + "xr" ], "author": { "name": "Ready Player Me",