Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## [201.0.0]

## What's New
- We're standardizing our OS versioning to provide more clarity on the scope and impact of each release. This helps you plan your development by making critical updates predictable and support documentation easier to navigate. Going forward, you'll see this new versioning system (e.g. OS 200, 201, etc.).
- **Tracking space support**: Movement SDK now works correctly when `OVRCameraRig.trackingSpace` has a non-identity pose. Previously, the body-tracking avatar would detach from the user's body when used with features like MRUK World Locking.
- **RootMotionMode support**: New `RootMotionMode` enum (`WorldSpace`/`LocalSpace`) in C# bindings, with root pose extraction via `GetPoseByRef` and root motion application option on `AIMotionSynthesizerSourceDataProvider`. Includes debug skeleton visualization.
- **Networked root scale**: Root scale is now serialized as part of the snapshot header, enabling correct character scale in networked sessions without manual C# setup.
- **Cross-engine config compatibility**: Added a skeleton flag and coordinate space conversion fixes so retargeting configs created in Unity work in Unreal (and vice versa). Existing configs continue to work on their original engine; new configs are cross-engine compatible.
- **Improved auto-mapping**: KnownJoint detection algorithm now correctly identifies joints on previously failing rigs (Unreal Mannequin, Avatar Gen Mas). Auto Fill is now ~1-click for ~95% of character rigs. New reverse mapping utility lets configs daisy-chain rig→rig retargeting.

## What's Changed
- **Minimum Unity version raised from 2022.3 to Unity 6.**
- **Joystick input improvements**: Reference forward calculation now uses `ProjectOnPlane`; removed automatic `OVRCameraRig` dependency (uses component's transform as default); direction logic considers movement direction when look input is inactive.
- **Simplified C# serialization API**: Removed unused `createSnapshot` entry point. All C# serialization calls now use struct-based APIs.

## What's Fixed
- **Retargeter no longer overwrites eye bone transforms**: `CharacterRetargeter` now skips joints that have no mapping in the source body-tracking skeleton, allowing components like `OVREyeGaze` to control eyes without being clobbered each frame.
- **`AnimatorHorizontalParam` fix** (resolves [Unity-Movement#133](https://github.com/oculus-samples/Unity-Movement/issues/133)).
- **Memory leaks** caused by undisposed `Allocator.TempJob` allocations in `GetTrackerPosesAndIndices` and `SkeletonUtilities.GetPosesFromTheTracker`, plus a leak of `TargetReferencePoseLocal` (`Allocator.Persistent`) in `SkeletonRetargeter.Dispose`.
- **`RootMotionMode` enum order restored** so Unity serialized values and dropdown entries match prior behavior.
- **Unmapped joints with zero-length parents** no longer flicker/oscillate in debug draw; falls back to scale 1.0.

## [83.0.0]

## What's New
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Meta.XR.Movement.AI.Editor
public class AIMotionSynthesizerJoystickInputEditor : UnityEditor.Editor
{
private SerializedProperty _inputModeProperty, _referenceTransformProperty;
private SerializedProperty _movementDirectionModeProperty, _facingDirectionModeProperty, _lockDirectionOnInputStartProperty;
#if USE_UNITY_INPUT_SYSTEM
private SerializedProperty _moveActionProperty, _lookActionProperty, _sprintActionProperty;
#endif
Expand All @@ -23,6 +24,9 @@ private void OnEnable()
{
_inputModeProperty = serializedObject.FindProperty("_inputMode");
_referenceTransformProperty = serializedObject.FindProperty("_referenceTransform");
_movementDirectionModeProperty = serializedObject.FindProperty("_movementDirectionMode");
_facingDirectionModeProperty = serializedObject.FindProperty("_facingDirectionMode");
_lockDirectionOnInputStartProperty = serializedObject.FindProperty("_lockDirectionOnInputStart");
#if USE_UNITY_INPUT_SYSTEM
_moveActionProperty = serializedObject.FindProperty("_moveAction");
_lookActionProperty = serializedObject.FindProperty("_lookAction");
Expand Down Expand Up @@ -53,14 +57,26 @@ public override void OnInspectorGUI()
{
EditorGUILayout.PropertyField(_inputModeProperty);
EditorGUILayout.PropertyField(_joystickThresholdProperty, new GUIContent("Dead Zone"));
EditorGUILayout.PropertyField(_movementDirectionModeProperty, new GUIContent("Movement Mode"));
EditorGUILayout.PropertyField(_facingDirectionModeProperty, new GUIContent("Direction Mode"));
EditorGUILayout.PropertyField(_lockDirectionOnInputStartProperty, new GUIContent("Lock Direction"));
});

EditorGUILayout.Space(4);

AIMotionSynthesizerEditorUtils.DrawSection("Input Reference", _headerColor, () =>
{
EditorGUILayout.PropertyField(_referenceTransformProperty, new GUIContent("Reference Transform"));
EditorGUILayout.HelpBox("Transform used for input calculations. Determines the coordinate space for velocity and direction. Defaults to camera rig if not set.", MessageType.Info);

var mode = (MovementDirectionMode)_movementDirectionModeProperty.enumValueIndex;
if (mode == MovementDirectionMode.Relative)
{
EditorGUILayout.HelpBox("Relative: movement follows reference transform direction.", MessageType.Info);
}
else
{
EditorGUILayout.HelpBox("Absolute: joystick maps to world axes (Up=+Z, Right=+X).", MessageType.Info);
}
});

EditorGUILayout.Space(4);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,48 @@ namespace Meta.XR.Movement.AI.Editor
[CustomEditor(typeof(AIMotionSynthesizerSourceDataProvider))]
public class AIMotionSynthesizerSourceDataProviderEditor : UnityEditor.Editor
{
private const string BasePath = "Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/";

private static readonly Color HeaderColor = new(0.3f, 0.5f, 0.7f, 0.2f);

private static readonly (string prop, string path)[] DefaultAssets =
{
("_config", "AIMotionSynthesizerSkeletonData.json"),
("_modelAsset", "AIMotionSynthesizerModel.bytes"),
("_guidanceAsset", "AIMotionSynthesizerGuidance.bytes")
};

private SerializedProperty _configProperty;
private SerializedProperty _modelAssetProperty;
private SerializedProperty _guidanceAssetProperty;
private SerializedProperty _inputProviderProperty;

private static readonly Color _headerColor = new Color(0.3f, 0.5f, 0.7f, 0.2f);
private SerializedProperty _applyRootMotionProperty;
private SerializedProperty _debugDrawSkeletonProperty;
private SerializedProperty _debugSkeletonColorProperty;

private void OnEnable()
{
_configProperty = serializedObject.FindProperty("_config");
_modelAssetProperty = serializedObject.FindProperty("_modelAsset");
_guidanceAssetProperty = serializedObject.FindProperty("_guidanceAsset");
_inputProviderProperty = serializedObject.FindProperty("_inputProvider");
_applyRootMotionProperty = serializedObject.FindProperty("_applyRootMotion");
_debugDrawSkeletonProperty = serializedObject.FindProperty("_debugDrawSkeleton");
_debugSkeletonColorProperty = serializedObject.FindProperty("_debugSkeletonColor");
}

public override void OnInspectorGUI()
{
serializedObject.Update();

EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour((MonoBehaviour)target), GetType(), false);
EditorGUI.EndDisabledGroup();

DrawScriptField();
EditorGUILayout.Space(4);

AIMotionSynthesizerEditorUtils.DrawSection("AIMotionSynthesizer Configuration", _headerColor, () =>
AIMotionSynthesizerEditorUtils.DrawSection("AIMotionSynthesizer Configuration", HeaderColor, () =>
{
EditorGUILayout.PropertyField(_configProperty);
EditorGUILayout.PropertyField(_modelAssetProperty);
EditorGUILayout.PropertyField(_guidanceAssetProperty);

EditorGUILayout.Space(4);

if (GUILayout.Button("Load Default Assets"))
Expand All @@ -49,53 +60,64 @@ public override void OnInspectorGUI()

EditorGUILayout.Space(4);

AIMotionSynthesizerEditorUtils.DrawSection("Input Control", _headerColor, () =>
AIMotionSynthesizerEditorUtils.DrawSection("Input Control", HeaderColor, () =>
{
EditorGUILayout.PropertyField(_inputProviderProperty, new GUIContent("Input Provider"));
});

serializedObject.ApplyModifiedProperties();
}

private void LoadDefaultAssets()
{
bool hasChanges = false;
EditorGUILayout.Space(4);

if (_configProperty.objectReferenceValue == null)
AIMotionSynthesizerEditorUtils.DrawSection("Root Motion", HeaderColor, () =>
{
var configFile = AssetDatabase.LoadAssetAtPath<TextAsset>("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerSkeletonData.json");
if (configFile != null)
{
_configProperty.objectReferenceValue = configFile;
hasChanges = true;
}
}
EditorGUILayout.PropertyField(_applyRootMotionProperty, new GUIContent("Apply Root Motion",
"Apply root motion (position and rotation) from the AI Motion Synthesizer to this transform"));
});

if (_modelAssetProperty.objectReferenceValue == null)
EditorGUILayout.Space(4);

AIMotionSynthesizerEditorUtils.DrawSection("Debug Visualization", HeaderColor, () =>
{
var modelFile = AssetDatabase.LoadAssetAtPath<TextAsset>("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerModel.bytes");
if (modelFile != null)
EditorGUILayout.PropertyField(_debugDrawSkeletonProperty, new GUIContent("Draw Skeleton"));
if (_debugDrawSkeletonProperty.boolValue)
{
_modelAssetProperty.objectReferenceValue = modelFile;
hasChanges = true;
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_debugSkeletonColorProperty, new GUIContent("Skeleton Color"));
EditorGUI.indentLevel--;
}
}
});

serializedObject.ApplyModifiedProperties();
}

private void DrawScriptField()
{
EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour((MonoBehaviour)target), GetType(), false);
EditorGUI.EndDisabledGroup();
}

private void LoadDefaultAssets()
{
bool hasChanges = false;

if (_guidanceAssetProperty.objectReferenceValue == null)
foreach (var (prop, path) in DefaultAssets)
{
var guidanceFile = AssetDatabase.LoadAssetAtPath<TextAsset>("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerGuidance.bytes");
if (guidanceFile != null)
var property = serializedObject.FindProperty(prop);
if (property?.objectReferenceValue == null)
{
_guidanceAssetProperty.objectReferenceValue = guidanceFile;
hasChanges = true;
var asset = AssetDatabase.LoadAssetAtPath<TextAsset>(BasePath + path);
if (asset != null)
{
property.objectReferenceValue = asset;
hasChanges = true;
}
}
}

if (_inputProviderProperty.objectReferenceValue == null)
{
var provider = (AIMotionSynthesizerSourceDataProvider)target;
var inputProviders = provider.GetComponents<MonoBehaviour>();
foreach (var component in inputProviders)
foreach (var component in provider.GetComponents<MonoBehaviour>())
{
if (component is IAIMotionSynthesizerInputProvider)
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Unity-Movement is a package that uses OpenXR’s tracking layer APIs to expose B
The Unity-Movement package is released under the [Oculus License](https://github.com/oculus-samples/Unity-Movement/blob/main/LICENSE.md). The MIT License applies to only certain, clearly marked documents. If an individual file does not indicate which license it is subject to, then the Oculus License applies.

### Requirements
- Unity 2022.3.15f1 or newer.
- Unity 6000.0.66f2 or newer.
- v81.0 or newer of the Meta XR SDK. You will need the [Meta XR Core SDK](https://assetstore.unity.com/packages/tools/integration/meta-xr-core-sdk-269169) and the [Meta XR Interaction SDK](https://assetstore.unity.com/packages/tools/integration/meta-xr-interaction-sdk-265014) packages found [on this page](https://assetstore.unity.com/publishers/25353).
- A project set up with these [steps](https://developer.oculus.com/documentation/unity/move-overview/#unity-project-setup).

Expand Down
Loading
Loading