├── .github
└── media
│ ├── MMData.png
│ ├── architecture_diagram.PNG
│ ├── avatar_joints.png
│ ├── local_forward_hips.PNG
│ └── path_mm.jpg
├── LICENSE
├── README.md
├── com.jlpm.motionmatching
├── Editor.meta
├── Editor
│ ├── Core.meta
│ ├── Core
│ │ ├── AnimationViewerEditorWindow.cs
│ │ ├── AnimationViewerEditorWindow.cs.meta
│ │ ├── HipsLocalVectorsHelperEditorWindow.cs
│ │ ├── HipsLocalVectorsHelperEditorWindow.cs.meta
│ │ ├── MMSearchDebugEditorWindow.cs
│ │ ├── MMSearchDebugEditorWindow.cs.meta
│ │ ├── MotionMatchingControllerEditor.cs
│ │ ├── MotionMatchingControllerEditor.cs.meta
│ │ ├── MotionMatchingDataEditor.cs
│ │ └── MotionMatchingDataEditor.cs.meta
│ ├── JLPM.MotionMatching.Editor.asmdef
│ ├── JLPM.MotionMatching.Editor.asmdef.meta
│ ├── MotionMatchingDocumentation.cs
│ └── MotionMatchingDocumentation.cs.meta
├── Runtime.meta
├── Runtime
│ ├── BVH.meta
│ ├── BVH
│ │ ├── BVHAnimation.cs
│ │ ├── BVHAnimation.cs.meta
│ │ ├── BVHDebug.cs
│ │ ├── BVHDebug.cs.meta
│ │ ├── BVHImporter.cs
│ │ └── BVHImporter.cs.meta
│ ├── CharacterController.meta
│ ├── CharacterController
│ │ ├── CollisionsSpringCharacterController.cs
│ │ ├── CollisionsSpringCharacterController.cs.meta
│ │ ├── MotionMatchingCharacterController.cs
│ │ ├── MotionMatchingCharacterController.cs.meta
│ │ ├── PathCharacterController.cs
│ │ ├── PathCharacterController.cs.meta
│ │ ├── SplineCharacterController.cs
│ │ ├── SplineCharacterController.cs.meta
│ │ ├── SpringCharacterController.cs
│ │ └── SpringCharacterController.cs.meta
│ ├── Core.meta
│ ├── Core
│ │ ├── Burst.meta
│ │ ├── Burst
│ │ │ ├── BVHMotionMatchingSearch.cs
│ │ │ ├── BVHMotionMatchingSearch.cs.meta
│ │ │ ├── LinearMotionMatchingSearchBurst.cs
│ │ │ ├── LinearMotionMatchingSearchBurst.cs.meta
│ │ │ ├── TagOperationsBurst.cs
│ │ │ └── TagOperationsBurst.cs.meta
│ │ ├── MotionMatchingController.cs
│ │ ├── MotionMatchingController.cs.meta
│ │ ├── Tags.cs
│ │ └── Tags.cs.meta
│ ├── Features.meta
│ ├── Features
│ │ ├── Feature1DExtractor.cs
│ │ ├── Feature1DExtractor.cs.meta
│ │ ├── Feature2DExtractor.cs
│ │ ├── Feature2DExtractor.cs.meta
│ │ ├── Feature3DExtractor.cs
│ │ ├── Feature3DExtractor.cs.meta
│ │ ├── Feature4DExtractor.cs
│ │ ├── Feature4DExtractor.cs.meta
│ │ ├── FeatureDebug.cs
│ │ ├── FeatureDebug.cs.meta
│ │ ├── FeatureSerializer.cs
│ │ ├── FeatureSerializer.cs.meta
│ │ ├── FeatureSet.cs
│ │ └── FeatureSet.cs.meta
│ ├── IK.meta
│ ├── IK
│ │ ├── TwoJointIK.cs
│ │ └── TwoJointIK.cs.meta
│ ├── Inertialization.meta
│ ├── Inertialization
│ │ ├── Inertialization.cs
│ │ └── Inertialization.cs.meta
│ ├── JLPM.MotionMatching.asmdef
│ ├── JLPM.MotionMatching.asmdef.meta
│ ├── Pose.meta
│ ├── Pose
│ │ ├── PoseExtractor.cs
│ │ ├── PoseExtractor.cs.meta
│ │ ├── PoseSerializer.cs
│ │ ├── PoseSerializer.cs.meta
│ │ ├── PoseSet.cs
│ │ ├── PoseSet.cs.meta
│ │ ├── PoseVector.cs
│ │ ├── PoseVector.cs.meta
│ │ ├── Skeleton.cs
│ │ └── Skeleton.cs.meta
│ ├── Unity.meta
│ ├── Unity
│ │ ├── AnimationData.cs
│ │ ├── AnimationData.cs.meta
│ │ ├── AvatarMaskData.cs
│ │ ├── AvatarMaskData.cs.meta
│ │ ├── MotionMatchingData.cs
│ │ ├── MotionMatchingData.cs.meta
│ │ ├── MotionMatchingSkinnedMeshRenderer.cs
│ │ ├── MotionMatchingSkinnedMeshRenderer.cs.meta
│ │ ├── SimpleMMController.cs
│ │ └── SimpleMMController.cs.meta
│ ├── Utils.meta
│ └── Utils
│ │ ├── BinarySerializerExtensions.cs
│ │ ├── BinarySerializerExtensions.cs.meta
│ │ ├── GizmosExtensions.cs
│ │ ├── GizmosExtensions.cs.meta
│ │ ├── HumanBodyBonesExtensions.cs
│ │ ├── HumanBodyBonesExtensions.cs.meta
│ │ ├── MathExtensions.cs
│ │ ├── MathExtensions.cs.meta
│ │ ├── PROFILE.cs
│ │ ├── PROFILE.cs.meta
│ │ ├── Spring.cs
│ │ └── Spring.cs.meta
├── Samples~
│ └── Examples
│ │ ├── Animations.meta
│ │ ├── Animations
│ │ ├── AnimationData.meta
│ │ ├── AnimationData
│ │ │ ├── jl_motionMatching.asset
│ │ │ ├── jl_motionMatching.asset.meta
│ │ │ ├── jl_motionMatching_tpose.asset
│ │ │ └── jl_motionMatching_tpose.asset.meta
│ │ ├── BVH.meta
│ │ ├── BVH
│ │ │ ├── jl_motionMatching_hd.txt
│ │ │ ├── jl_motionMatching_hd.txt.meta
│ │ │ ├── jl_motionMatching_tpose.txt
│ │ │ └── jl_motionMatching_tpose.txt.meta
│ │ ├── MMData.meta
│ │ ├── MMData
│ │ │ ├── JLData.asset
│ │ │ └── JLData.asset.meta
│ │ ├── Other.meta
│ │ └── Other
│ │ │ ├── EmptyAvatarMaskData.asset
│ │ │ ├── EmptyAvatarMaskData.asset.meta
│ │ │ ├── LowerBodyAvatarMaskData.asset
│ │ │ └── LowerBodyAvatarMaskData.asset.meta
│ │ ├── Assets.meta
│ │ ├── Assets
│ │ ├── Materials.meta
│ │ ├── Materials
│ │ │ ├── GroundMat.mat
│ │ │ └── GroundMat.mat.meta
│ │ ├── Models.meta
│ │ ├── Models
│ │ │ ├── Joe.meta
│ │ │ └── Joe
│ │ │ │ ├── Ch33_1001_Diffuse.png
│ │ │ │ ├── Ch33_1001_Diffuse.png.meta
│ │ │ │ ├── Ch33_1001_Glossiness.png
│ │ │ │ ├── Ch33_1001_Glossiness.png.meta
│ │ │ │ ├── Ch33_1001_Normal.png
│ │ │ │ ├── Ch33_1001_Normal.png.meta
│ │ │ │ ├── Ch33_1001_Specular.png
│ │ │ │ ├── Ch33_1001_Specular.png.meta
│ │ │ │ ├── Ch33_1002_Diffuse.png
│ │ │ │ ├── Ch33_1002_Diffuse.png.meta
│ │ │ │ ├── Ch33_1002_Normal.png
│ │ │ │ ├── Ch33_1002_Normal.png.meta
│ │ │ │ ├── Ch33_body.mat
│ │ │ │ ├── Ch33_body.mat.meta
│ │ │ │ ├── Ch33_hair.mat
│ │ │ │ ├── Ch33_hair.mat.meta
│ │ │ │ ├── Joe.fbx
│ │ │ │ ├── Joe.fbx.meta
│ │ │ │ ├── Joe.prefab
│ │ │ │ └── Joe.prefab.meta
│ │ ├── Prefabs.meta
│ │ ├── Prefabs
│ │ │ ├── SimpleMMController.prefab
│ │ │ └── SimpleMMController.prefab.meta
│ │ ├── UnityAnimations.meta
│ │ └── UnityAnimations
│ │ │ ├── ExampleAnimController.controller
│ │ │ ├── ExampleAnimController.controller.meta
│ │ │ ├── HipHopDancing.fbx
│ │ │ └── HipHopDancing.fbx.meta
│ │ ├── Scenes.meta
│ │ ├── Scenes
│ │ ├── 00_Basic.meta
│ │ ├── 00_Basic
│ │ │ ├── ExampleSimpleMMController.unity
│ │ │ ├── ExampleSimpleMMController.unity.meta
│ │ │ ├── ExampleSplines.unity
│ │ │ └── ExampleSplines.unity.meta
│ │ ├── 01_Advanced.meta
│ │ └── 01_Advanced
│ │ │ ├── ExampleColliders.unity
│ │ │ ├── ExampleColliders.unity.meta
│ │ │ ├── ExampleFeatureVisualization.unity
│ │ │ ├── ExampleFeatureVisualization.unity.meta
│ │ │ ├── ExamplePathTest.unity
│ │ │ ├── ExamplePathTest.unity.meta
│ │ │ ├── ExampleTags.unity
│ │ │ ├── ExampleTags.unity.meta
│ │ │ ├── ExampleThirdPerson.unity
│ │ │ ├── ExampleThirdPerson.unity.meta
│ │ │ ├── ExampleUnityAnimationIntegration.unity
│ │ │ └── ExampleUnityAnimationIntegration.unity.meta
│ │ ├── Scripts.meta
│ │ └── Scripts
│ │ ├── Camera.meta
│ │ ├── Camera
│ │ ├── FollowCamera.cs
│ │ └── FollowCamera.cs.meta
│ │ ├── Custom.meta
│ │ ├── Custom
│ │ ├── Custom2DFeatureExtractor.cs
│ │ └── Custom2DFeatureExtractor.cs.meta
│ │ ├── Input.meta
│ │ ├── Input
│ │ ├── InputCharacterController.cs
│ │ ├── InputCharacterController.cs.meta
│ │ ├── InputManager.cs
│ │ ├── InputManager.cs.meta
│ │ ├── PlayerInput.cs
│ │ ├── PlayerInput.cs.meta
│ │ ├── PlayerInput.inputactions
│ │ ├── PlayerInput.inputactions.meta
│ │ ├── SimpleKeyboardInput.cs
│ │ ├── SimpleKeyboardInput.cs.meta
│ │ ├── SimpleRandomInput.cs
│ │ └── SimpleRandomInput.cs.meta
│ │ ├── Tags.meta
│ │ └── Tags
│ │ ├── TagSwitchHelper.cs
│ │ └── TagSwitchHelper.cs.meta
├── package.json
└── package.json.meta
└── minimalproject
├── .gitignore
├── Assets
├── New Scene.unity
├── New Scene.unity.meta
├── Settings.meta
└── Settings
│ ├── DefaultVolumeProfile.asset
│ ├── DefaultVolumeProfile.asset.meta
│ ├── Lighting Settings.lighting
│ ├── Lighting Settings.lighting.meta
│ ├── URP-Balanced-Renderer.asset
│ ├── URP-Balanced-Renderer.asset.meta
│ ├── URP-Balanced.asset
│ ├── URP-Balanced.asset.meta
│ ├── URP-HighFidelity-Renderer.asset
│ ├── URP-HighFidelity-Renderer.asset.meta
│ ├── URP-HighFidelity.asset
│ ├── URP-HighFidelity.asset.meta
│ ├── URP-Performant-Renderer.asset
│ ├── URP-Performant-Renderer.asset.meta
│ ├── URP-Performant.asset
│ ├── URP-Performant.asset.meta
│ ├── UniversalRenderPipelineGlobalSettings.asset
│ └── UniversalRenderPipelineGlobalSettings.asset.meta
├── Packages
├── manifest.json
└── packages-lock.json
└── ProjectSettings
├── AudioManager.asset
├── BurstAotSettings_StandaloneWindows.json
├── ClusterInputManager.asset
├── CommonBurstAotSettings.json
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── MemorySettings.asset
├── MultiplayerManager.asset
├── NavMeshAreas.asset
├── PackageManagerSettings.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── SceneTemplateSettings.json
├── ShaderGraphSettings.asset
├── TagManager.asset
├── TimeManager.asset
├── TimelineSettings.asset
├── URPProjectSettings.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
├── VersionControlSettings.asset
└── XRSettings.asset
/.github/media/MMData.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/.github/media/MMData.png
--------------------------------------------------------------------------------
/.github/media/architecture_diagram.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/.github/media/architecture_diagram.PNG
--------------------------------------------------------------------------------
/.github/media/avatar_joints.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/.github/media/avatar_joints.png
--------------------------------------------------------------------------------
/.github/media/local_forward_hips.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/.github/media/local_forward_hips.PNG
--------------------------------------------------------------------------------
/.github/media/path_mm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/.github/media/path_mm.jpg
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022-present Jose Luis Ponton
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Motion Matching
2 |
3 | 
4 |
5 | ------
6 |
7 | 📚 **[Documentation](https://jlpm22.github.io/motionmatching-docs/)**
8 |
9 | Welcome to the **Motion Matching** implementation designed for the **Unity** game engine. This project originated from the author's master thesis, providing a deep dive into both the Motion Matching technique and the workings of this specific Unity package. Download the complete thesis [here](https://www.researchgate.net/publication/363377742_Motion_Matching_for_Character_Animation_and_Virtual_Reality_Avatars_in_Unity) for an extensive overview. The project is a work-in-progress, aiming to offer a comprehensive Motion Matching solution for Unity. It can serve as a useful resource for those keen to learn or implement their own Motion Matching solution or even extend this existing package.
10 |
11 | 
12 |
13 | # Quick Start Guide
14 |
15 | Follow these steps to get started with the Motion Matching package for Unity. Visit the 📚 **[Documentation](https://jlpm22.github.io/motionmatching-docs/)** for an in-depth description of the project.
16 |
17 | ## Installation Steps
18 |
19 | 1. Ensure you have **Unity 6+** installed (untested on other versions).
20 |
21 | 2. Open the Unity Editor and navigate to **Window > Package Manager**.
22 |
23 | 3. In the Package Manager, click **Add (+) > Add package by git URL...**.
24 |
25 | 4. Insert the following URL into the git URL field and click **Add**:
26 | ```
27 | https://github.com/JLPM22/MotionMatching.git?path=/com.jlpm.motionmatching
28 | ```
29 |
30 | > Note: All sample scenes use the Universal Render Pipeline (URP). Conversion may be necessary if you are using a different render pipeline.
31 |
32 | 5. *[Optional]* In the Package Manager, click on **Motion Matching**, then import the example scenes by selecting **Samples > Examples > Import**.
33 |
34 | 6. *[Optional]* Go to ``Examples/Scenes/`` in the Project Window to explore the sample scenes.
35 |
36 | ## Project Overview
37 |
38 | ### Directories
39 |
40 | - `Samples/Animations`: Contains motion capture (MoCap) files (with *.txt* extensions but originally *.bvh* files) and *MMData* files to define the animation database for the Motion Matching System.
41 |
42 | - `StreamingAssets/MMDatabases`: Contains the processed pose and feature databases, as well as skeletal information. This directory is automatically created when generating databases from an *MMData* file.
43 |
44 | ### Key Components
45 |
46 | Demo scenes consist of two primary GameObjects:
47 |
48 | 1. **Character Controller**: Creates trajectories and imposes positional constraints, like limiting the maximum distance between the simulated and animated character positions.
49 |
50 | 2. **MotionMatchingController**: Handles all Motion Matching operations. It provides adjustable parameters for enabling/disabling features like inertialize blending or foot locking.
51 |
52 | Feel free to tweak and explore these components to get a better understanding of the system.
53 |
54 | # Roadmap
55 |
56 | Here's a list of upcoming features and improvements to enhance the capabilities and usability of the Motion Matching package for Unity:
57 |
58 | ## Planned Features
59 |
60 | Visit [Roadmap](https://jlpm22.github.io/motionmatching-docs/roadmap/) for a detailed list of upcoming features and improvements.
61 |
62 | Your contributions and suggestions are always welcome as we continue to develop this project into a comprehensive Motion Matching solution for Unity.
63 |
64 | ## Projects using this package
65 |
66 | - [Motion Matching for VR](https://upc-virvig.github.io/MMVR/)
67 | - [XR4ED](https://xr4ed.eu/)
68 | - [Exploring the Role of Expected Collision Feedback in Crowded Virtual Environments](https://doi.org/10.1109/VR58804.2024.00068)
69 | - [Ragdoll Matching](https://webthesis.biblio.polito.it/30986/)
70 | - [Social Crowd Simulation](https://dl.acm.org/doi/10.1145/3677388.3696337)
71 | - [Improving Motion matching for VR](https://purehost.bath.ac.uk/ws/portalfiles/portal/303538262/poster_9.pdf)
72 |
73 | ## Citation
74 |
75 | If you find this package beneficial, kindly attribute it to this repository or cite the author's master thesis using the following citation:
76 |
77 | ```plaintext
78 | @mastersthesis{ponton2022mm,
79 | author = {Ponton, Jose Luis},
80 | title = {Motion Matching for Character Animation and Virtual Reality Avatars in Unity},
81 | school = {Universitat Politecnica de Catalunya},
82 | year = {2022},
83 | doi = {10.13140/RG.2.2.31741.23528/1}
84 | }
85 | ```
86 |
87 | ## License
88 |
89 | This project is distributed under the MIT License. For complete license details, refer to the [LICENSE](https://github.com/JLPM22/MotionMatching/blob/main/LICENSE) file.
90 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9ecdfef026898b8468a80454cb96926a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/Core.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a7bd3f85ac518c640a05002592a1ef10
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/Core/AnimationViewerEditorWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be84300649f03ca4691d9bb88cfd9441
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/Core/HipsLocalVectorsHelperEditorWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 67acf7c72cc6abe4e941a005b1ab9fee
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/Core/MMSearchDebugEditorWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4dd52e2722862d64fa51f3cafbbd352e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/Core/MotionMatchingControllerEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using UnityEditor;
5 |
6 | namespace MotionMatching
7 | {
8 | [CustomEditor(typeof(MotionMatchingController))]
9 | public class MotionMatchingControllerEditor : Editor
10 | {
11 | private bool ToggleFeatureWeights;
12 | private bool ToggleProfiling;
13 | private bool ToggleDebug;
14 |
15 | public override void OnInspectorGUI()
16 | {
17 | base.OnInspectorGUI();
18 |
19 | MotionMatchingController controller = (MotionMatchingController)target;
20 |
21 | if (controller == null) { return; }
22 | if (controller.MMData == null) { return; }
23 |
24 | // Feature Weights
25 | if (controller.FeatureWeights.Length != (controller.MMData.TrajectoryFeatures.Count + controller.MMData.PoseFeatures.Count))
26 | {
27 | float[] newWeights = new float[controller.MMData.TrajectoryFeatures.Count + controller.MMData.PoseFeatures.Count];
28 | for (int i = 0; i < newWeights.Length; ++i) newWeights[i] = 1.0f;
29 | for (int i = 0; i < Mathf.Min(controller.FeatureWeights.Length, newWeights.Length); i++) newWeights[i] = controller.FeatureWeights[i];
30 | controller.FeatureWeights = newWeights;
31 | }
32 | ToggleFeatureWeights = EditorGUILayout.BeginFoldoutHeaderGroup(ToggleFeatureWeights, "Feature Weights");
33 | if (ToggleFeatureWeights)
34 | {
35 | EditorGUI.indentLevel++;
36 | EditorGUILayout.BeginVertical(GUI.skin.box);
37 | for (int i = 0; i < controller.MMData.TrajectoryFeatures.Count; ++i)
38 | {
39 | string name = controller.MMData.TrajectoryFeatures[i].Name;
40 | controller.FeatureWeights[i] = EditorGUILayout.FloatField(name, controller.FeatureWeights[i]);
41 | }
42 | EditorGUILayout.EndVertical();
43 | EditorGUILayout.BeginVertical(GUI.skin.box);
44 | for (int i = 0; i < controller.MMData.PoseFeatures.Count; ++i)
45 | {
46 | string name = controller.MMData.PoseFeatures[i].Name;
47 | int index = controller.MMData.TrajectoryFeatures.Count + i;
48 | controller.FeatureWeights[index] = EditorGUILayout.FloatField(name, controller.FeatureWeights[index]);
49 | }
50 | EditorGUILayout.EndVertical();
51 | EditorGUI.indentLevel--;
52 | }
53 | EditorGUILayout.EndFoldoutHeaderGroup();
54 |
55 | // Debug & Profiling
56 | if (!Application.isPlaying) return;
57 |
58 | ToggleDebug = EditorGUILayout.BeginFoldoutHeaderGroup(ToggleDebug, "Debug");
59 | if (ToggleDebug)
60 | {
61 | EditorGUILayout.LabelField("Pose Index: " + controller.GetCurrentFrame());
62 | }
63 | EditorGUILayout.EndFoldoutHeaderGroup();
64 |
65 | ToggleProfiling = EditorGUILayout.BeginFoldoutHeaderGroup(ToggleProfiling, "Profiling");
66 | if (ToggleProfiling)
67 | {
68 | if (PROFILE.IS_PROFILING_ENABLED())
69 | {
70 | PROFILE.DATA totalMotionMatchingData = PROFILE.GET_DATA("Motion Matching Total");
71 | if (totalMotionMatchingData != null)
72 | {
73 | EditorGUILayout.Space();
74 | EditorGUILayout.LabelField("Total:");
75 | EditorGUILayout.LabelField("Min: " + totalMotionMatchingData.MinMs.ToString("F2") + "ms" + " (" + totalMotionMatchingData.MinTicks.ToString("F0") + " ticks)");
76 | EditorGUILayout.LabelField("Max: " + totalMotionMatchingData.MaxMs.ToString("F2") + "ms" + " (" + totalMotionMatchingData.MaxTicks.ToString("F0") + " ticks)");
77 | EditorGUILayout.LabelField("Avg: " + totalMotionMatchingData.GetAverageMs().ToString("F2") + "ms" + " (" + totalMotionMatchingData.GetAverageTicks().ToString("F0") + " ticks)");
78 | }
79 |
80 | PROFILE.DATA searchMotionMatchingData = PROFILE.GET_DATA("Motion Matching Search");
81 | if (searchMotionMatchingData != null)
82 | {
83 | EditorGUILayout.Space();
84 | EditorGUILayout.LabelField("Search:");
85 | EditorGUILayout.LabelField("Min: " + searchMotionMatchingData.MinMs.ToString("F2") + "ms" + " (" + searchMotionMatchingData.MinTicks.ToString("F0") + " ticks)");
86 | EditorGUILayout.LabelField("Max: " + searchMotionMatchingData.MaxMs.ToString("F2") + "ms" + " (" + searchMotionMatchingData.MaxTicks.ToString("F0") + " ticks)");
87 | EditorGUILayout.LabelField("Avg: " + searchMotionMatchingData.GetAverageMs().ToString("F2") + "ms" + " (" + searchMotionMatchingData.GetAverageTicks().ToString("F0") + " ticks)");
88 | }
89 | }
90 | }
91 | EditorGUILayout.EndFoldoutHeaderGroup();
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/Core/MotionMatchingControllerEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59679c2b347814b4e80c42c641041514
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/Core/MotionMatchingDataEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0b7812219932de442a25a33163538d95
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/JLPM.MotionMatching.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "JLPM.MotionMatching.Editor",
3 | "rootNamespace": "",
4 | "references": [
5 | "JLPM.MotionMatching",
6 | "Unity.Mathematics"
7 | ],
8 | "includePlatforms": [
9 | "Editor"
10 | ],
11 | "excludePlatforms": [],
12 | "allowUnsafeCode": true,
13 | "overrideReferences": false,
14 | "precompiledReferences": [],
15 | "autoReferenced": true,
16 | "defineConstraints": [],
17 | "versionDefines": [],
18 | "noEngineReferences": false
19 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/JLPM.MotionMatching.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64134393f9bc5864593fb1d7425278ce
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/MotionMatchingDocumentation.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 |
4 | namespace MotionMatching
5 | {
6 | public class MotionMatchingDocumentation : EditorWindow
7 | {
8 | [MenuItem("MotionMatching/Documentation", priority = 100000)]
9 | public static void ShowWindow()
10 | {
11 | Application.OpenURL("https://jlpm22.github.io/motionmatching-docs/");
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Editor/MotionMatchingDocumentation.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7478ff9726d32a94996e2729b9e82b54
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8017b1d393b811d478f64754d1805be6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/BVH.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e4ac8b3293d1ce94197ba296f4f09eb4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/BVH/BVHAnimation.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using Unity.Mathematics;
5 | using System;
6 |
7 | namespace MotionMatching
8 | {
9 | using Joint = Skeleton.Joint;
10 |
11 | ///
12 | /// Stores the BVH animation data in Unity format.
13 | ///
14 | public class BVHAnimation
15 | {
16 | public float FrameTime { get; private set; }
17 | public Skeleton Skeleton { get; private set; }
18 | public List EndSites { get; private set; }
19 | public Frame[] Frames { get; private set; }
20 |
21 | public BVHAnimation()
22 | {
23 | Skeleton = new Skeleton();
24 | EndSites = new List();
25 | }
26 |
27 | public void SetFrameTime(float frameTime)
28 | {
29 | FrameTime = frameTime;
30 | }
31 |
32 | public void InitFrames(int numberFrames)
33 | {
34 | Frames = new Frame[numberFrames];
35 | }
36 |
37 | public void AddFrame(int index, Frame frame)
38 | {
39 | Frames[index] = frame;
40 | }
41 |
42 | public void AddJoint(Joint joint)
43 | {
44 | Skeleton.AddJoint(joint);
45 | }
46 |
47 | public void AddEndSite(EndSite endSite)
48 | {
49 | EndSites.Add(endSite);
50 | }
51 |
52 | public void UpdateMecanimInformation(MotionMatchingData motionMatchingData)
53 | {
54 | for (int i = 0; i < Skeleton.Joints.Count; i++)
55 | {
56 | Joint joint = Skeleton.Joints[i];
57 | if (motionMatchingData.GetMecanimBone(joint.Name, out HumanBodyBones bone))
58 | {
59 | joint.Type = bone;
60 | Skeleton.Joints[i] = joint;
61 | }
62 | }
63 | }
64 |
65 | ///
66 | /// Apply forward kinematics to obtain the quaternion rotating from the local
67 | /// coordinate system of the joint to the world coordinate system.
68 | ///
69 | public quaternion GetWorldRotation(Joint joint, int frameIndex)
70 | {
71 | Frame frame = Frames[frameIndex];
72 | quaternion worldRot = quaternion.identity;
73 |
74 | while (joint.Index != 0) // while not root
75 | {
76 | worldRot = frame.LocalRotations[joint.Index] * worldRot;
77 | joint = Skeleton.GetParent(joint);
78 | }
79 | worldRot = frame.LocalRotations[0] * worldRot; // root
80 |
81 | return worldRot;
82 | }
83 |
84 | public struct EndSite
85 | {
86 | public int ParentIndex;
87 | public Vector3 Offset;
88 |
89 | public EndSite(int parentIndex, Vector3 offset)
90 | {
91 | ParentIndex = parentIndex;
92 | Offset = offset;
93 | }
94 | }
95 |
96 | public struct Frame
97 | {
98 | public Vector3 RootMotion;
99 | public Quaternion[] LocalRotations;
100 |
101 | public Frame(Vector3 rootMotion, Quaternion[] localRotations)
102 | {
103 | RootMotion = rootMotion;
104 | LocalRotations = localRotations;
105 | }
106 | }
107 | }
108 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/BVH/BVHAnimation.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d042c52aedd139144ac4b7b5fc7da8c6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/BVH/BVHDebug.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using MotionMatching;
4 | using UnityEngine;
5 |
6 | ///
7 | /// Import a BVH and visualize it using Gizmos.
8 | ///
9 | public class BVHDebug : MonoBehaviour
10 | {
11 | public TextAsset BVH;
12 | public float UnitScale = 1;
13 | public int BVHIndex = 0;
14 | public bool Play;
15 | public float SpheresRadius = 0.1f;
16 | public bool LockFPS = true;
17 |
18 | private BVHAnimation Animation;
19 | private Transform[] Skeleton;
20 | private int CurrentFrame;
21 |
22 | private void Awake()
23 | {
24 | BVHImporter importer = new BVHImporter();
25 | Animation = importer.Import(BVH, UnitScale);
26 |
27 | Skeleton = new Transform[Animation.Skeleton.Joints.Count];
28 | foreach (Skeleton.Joint joint in Animation.Skeleton.Joints)
29 | {
30 | Transform t = (new GameObject()).transform;
31 | t.name = joint.Name;
32 | if (joint.Index == 0) t.SetParent(transform, false);
33 | else t.SetParent(Skeleton[joint.ParentIndex], false);
34 | t.localPosition = joint.LocalOffset;
35 | Skeleton[joint.Index] = t;
36 | }
37 |
38 | if (LockFPS)
39 | {
40 | Application.targetFrameRate = (int)(1.0f / Animation.FrameTime);
41 | Debug.Log("[BVHDebug] Updated Target FPS: " + Application.targetFrameRate);
42 | }
43 | else
44 | {
45 | Application.targetFrameRate = -1;
46 | }
47 | }
48 |
49 | private void Update()
50 | {
51 | if (Play)
52 | {
53 | BVHAnimation.Frame frame = Animation.Frames[CurrentFrame];
54 | Skeleton[0].localPosition = frame.RootMotion;
55 | for (int i = 0; i < frame.LocalRotations.Length; i++)
56 | {
57 | Skeleton[i].localRotation = frame.LocalRotations[i];
58 | }
59 | CurrentFrame = (CurrentFrame + 1) % Animation.Frames.Length;
60 | }
61 | else
62 | {
63 | CurrentFrame = 0;
64 | Skeleton[0].localPosition = Vector3.zero;
65 | for (int i = 0; i < Skeleton.Length; i++)
66 | {
67 | Skeleton[i].localRotation = Quaternion.identity;
68 | }
69 | }
70 | }
71 |
72 | #if UNITY_EDITOR
73 | private void OnDrawGizmos()
74 | {
75 | if (Skeleton == null || Animation == null || Animation.EndSites == null) return;
76 |
77 | Gizmos.color = Color.red;
78 | for (int i = 1; i < Skeleton.Length; i++)
79 | {
80 | Transform t = Skeleton[i];
81 | GizmosExtensions.DrawLine(t.parent.position, t.position, 3);
82 | }
83 | // Uncomment to show end sites
84 | // foreach (BVHAnimation.EndSite endSite in Animation.EndSites)
85 | // {
86 | // Transform t = Skeleton[endSite.ParentIndex];
87 | // GizmosExtensions.DrawLine(t.position, t.TransformPoint(endSite.Offset), 3);
88 | // }
89 |
90 | Gizmos.color = new Color(1.0f, 0.3f, 0.1f, 1.0f);
91 | foreach (Transform t in Skeleton)
92 | {
93 | if (t.name == "End Site") continue;
94 | Gizmos.DrawWireSphere(t.position, SpheresRadius);
95 | }
96 | }
97 | #endif
98 | }
99 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/BVH/BVHDebug.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ad29054695640e4f8c6ab662737ae84
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/BVH/BVHImporter.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Runtime/BVH/BVHImporter.cs
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/BVH/BVHImporter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3fc91b54eeedebc47b44fed54fc00354
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/CharacterController.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d9061da4d6053c469c07810e243eec6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/CharacterController/CollisionsSpringCharacterController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e1cd36b12b32de43b184d13f394a427
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/CharacterController/MotionMatchingCharacterController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Unity.Collections;
4 | using Unity.Mathematics;
5 | using UnityEngine;
6 |
7 | namespace MotionMatching
8 | {
9 | using TrajectoryFeature = MotionMatchingData.TrajectoryFeature;
10 |
11 | public abstract class MotionMatchingCharacterController : MonoBehaviour
12 | {
13 | // TODO: Create a OnValidate() (other name because it will collide with Unity's
14 | // that validates if the current MMData has the necessary trajectories requeried
15 | // by the current controller (eg. simulation bone pos + dir, or HMD + L/R controllers pos + dir)
16 |
17 | public event Action OnUpdated;
18 | public event Action OnInputChangedQuickly;
19 |
20 | public MotionMatchingController MotionMatching; // MotionMatchingController's transform is the SimulationBone of the character
21 |
22 | public float DatabaseDeltaTime { get; private set; }
23 |
24 | private void LateUpdate()
25 | {
26 | DatabaseDeltaTime = MotionMatching.DatabaseFrameTime;
27 | // Update the character
28 | OnUpdate();
29 | // Update other components depending on the character controller
30 | if (OnUpdated != null) OnUpdated.Invoke(Time.deltaTime);
31 | }
32 |
33 | ///
34 | /// Call this method to notify Motion Matching that a large change in the input has been made.
35 | /// Therefore, an immediate Motion Matching search should be performed.
36 | ///
37 | protected void NotifyInputChangedQuickly()
38 | {
39 | if (OnInputChangedQuickly != null) OnInputChangedQuickly.Invoke();
40 | }
41 |
42 | ///
43 | /// Use this intead of Unity's Update() method.
44 | ///
45 | protected abstract void OnUpdate();
46 |
47 | ///
48 | /// Return the initial world position of the character.
49 | ///
50 | public abstract float3 GetWorldInitPosition();
51 | ///
52 | /// Return the initial world direction of the character.
53 | ///
54 | public abstract float3 GetWorldInitDirection();
55 |
56 | ///
57 | /// Get the prediction in character space of a trajectory feature.
58 | /// e.g., suppose that the feature is the projected position of the character at frames 20, 40 and 60 in the future:
59 | /// then, since the projected position is 2D (2 floats), thus, output[0] and output[1] should be filled with the X and Z coordinates.
60 | /// e.g., when index==1, it should return the position of the character at frame 40.
61 | ///
62 | public abstract void GetTrajectoryFeature(TrajectoryFeature feature, int index, Transform character, NativeArray output);
63 | }
64 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/CharacterController/MotionMatchingCharacterController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f1f1d02ef4f50324580cdb15b931dbd6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/CharacterController/PathCharacterController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14d8336587724e7438d61a3d804f1202
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/CharacterController/SplineCharacterController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04535ab26d0046c4a95a5a7abe3cfcc6
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/CharacterController/SpringCharacterController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3263f4711897b924aa892c1da8c94ed6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8b45060059337e54298a1eb0de0ceb5a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/Burst.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e0028f6129ce27449321168299cdb8b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/Burst/BVHMotionMatchingSearch.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab5721ddc91447c44967051d2afff7f3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/Burst/LinearMotionMatchingSearchBurst.cs:
--------------------------------------------------------------------------------
1 | using Unity.Burst;
2 | using Unity.Jobs;
3 | using Unity.Collections;
4 | using UnityEngine;
5 | using Unity.Mathematics;
6 |
7 | namespace MotionMatching
8 | {
9 | // Burst-based job for linearly search the best feature vector given a query feature vector
10 | [BurstCompile]
11 | public struct LinearMotionMatchingSearchBurst : IJob
12 | {
13 | [ReadOnly] public NativeArray Valid; // TODO: If all features are valid, this will be unnecessary
14 | [ReadOnly] public NativeArray TagMask; // TODO: convert to a bitmask to optimize memory
15 | [ReadOnly] public NativeArray Features;
16 | [ReadOnly] public NativeArray QueryFeature;
17 | [ReadOnly] public NativeArray FeatureWeights; // Size = FeatureSize
18 | [ReadOnly] public int FeatureSize;
19 | [ReadOnly] public int PoseOffset;
20 | [ReadOnly] public float CurrentDistance;
21 |
22 | [WriteOnly] public NativeArray BestIndex;
23 |
24 | // I use float4 (even if the code is less readable) to let Burst vectorize the code
25 | // after profiling... it is way faster than using float directly
26 | public void Execute()
27 | {
28 | float4 min = new float4(CurrentDistance);
29 | int4 bestIndex = new int4(-1);
30 | int count4 = Valid.Length >> 2; // /4
31 | int lastCount = Valid.Length & 0b011; // %4
32 | for (int i = 0; i < count4; ++i)
33 | {
34 | int index = i << 2;
35 | int featureIndex = index * FeatureSize;
36 | // Trajectory
37 | float4 sqrDistance = new float4(0.0f);
38 | for (int j = 0; j < FeatureSize; ++j)
39 | {
40 | float4 query = new float4(QueryFeature[j]);
41 | float4 cost = new float4(Features[featureIndex + j], Features[featureIndex + j + FeatureSize], Features[featureIndex + j + 2 * FeatureSize], Features[featureIndex + j + 3 * FeatureSize]);
42 | cost = cost - query;
43 | sqrDistance += cost * cost * FeatureWeights[j];
44 | }
45 | // Compare
46 | if (math.any(sqrDistance < min)) // most of the time this will be false... (profiling: 5-10% speedup)
47 | {
48 | if (sqrDistance.x < min.x && Valid[index] && TagMask[index]) // Checking Valid here is more performant than using it to avoid calculations... probably most of the time sqrDistance < min is false and reduces memory accesses (Valid is not used)
49 | {
50 | min.x = sqrDistance.x;
51 | bestIndex.x = index;
52 | }
53 | if (sqrDistance.y < min.y && Valid[index + 1] && TagMask[index + 1])
54 | {
55 | min.y = sqrDistance.y;
56 | bestIndex.y = index + 1;
57 | }
58 | if (sqrDistance.z < min.z && Valid[index + 2] && TagMask[index + 1])
59 | {
60 | min.z = sqrDistance.z;
61 | bestIndex.z = index + 2;
62 | }
63 | if (sqrDistance.w < min.w && Valid[index + 3] && TagMask[index + 1])
64 | {
65 | min.w = sqrDistance.w;
66 | bestIndex.w = index + 3;
67 | }
68 | }
69 | }
70 | const float eps = 0.000001f;
71 | float _min = CurrentDistance - eps;
72 | int _bestIndex = -1;
73 | if (min.x < _min) { _min = min.x; _bestIndex = bestIndex.x; }
74 | if (min.y < _min) { _min = min.y; _bestIndex = bestIndex.y; }
75 | if (min.z < _min) { _min = min.z; _bestIndex = bestIndex.z; }
76 | if (min.w < _min) { _min = min.w; _bestIndex = bestIndex.w; }
77 | // Last items (not multiple of 4)
78 | for (int i = 0; i < lastCount; ++i)
79 | {
80 | int index = Valid.Length - lastCount + i;
81 | int featureIndex = index * FeatureSize;
82 | float sqrDistance = 0.0f;
83 | for (int j = 0; j < FeatureSize; ++j)
84 | {
85 | float diff = Features[featureIndex + j] - QueryFeature[j];
86 | sqrDistance += diff * diff * FeatureWeights[j];
87 | }
88 | if (sqrDistance < _min && Valid[index] && TagMask[index])
89 | {
90 | _min = sqrDistance;
91 | _bestIndex = index;
92 | }
93 | }
94 | BestIndex[0] = _bestIndex;
95 | }
96 | }
97 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/Burst/LinearMotionMatchingSearchBurst.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7b3ead5253995f941836ccb85e0a28b4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/Burst/TagOperationsBurst.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using Unity.Burst;
4 | using Unity.Collections;
5 | using Unity.Jobs;
6 | using UnityEngine;
7 |
8 | namespace MotionMatching
9 | {
10 | [BurstCompile]
11 | public struct DisableTagBurst : IJob
12 | {
13 | [WriteOnly] public NativeArray TagMask;
14 |
15 | public void Execute()
16 | {
17 | for (int i = 0; i < TagMask.Length; i++)
18 | {
19 | TagMask[i] = true;
20 | }
21 | }
22 | }
23 |
24 | [BurstCompile]
25 | public struct SetTagBurst : IJob
26 | {
27 | [ReadOnly] public int MaximumFramesPrediction; // Number of prediction frames of the longest trajectory feature
28 | [ReadOnly] public NativeArray StartRanges;
29 | [ReadOnly] public NativeArray EndRanges;
30 | [WriteOnly] public NativeArray TagMask;
31 |
32 | public void Execute()
33 | {
34 | for (int i = 0; i < TagMask.Length; i++)
35 | {
36 | TagMask[i] = false;
37 | }
38 | for (int i = 0; i < StartRanges.Length; i++)
39 | {
40 | int start = StartRanges[i];
41 | int end = EndRanges[i];
42 | for (int j = start; j < end - MaximumFramesPrediction; j++)
43 | {
44 | TagMask[j] = true;
45 | }
46 | }
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/Burst/TagOperationsBurst.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 20d2a73762bf1b443bd9cf49c49dfc71
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/MotionMatchingController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c61468b8454f5ae4f906e45c7a7fec1c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Core/Tags.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e22423214f5e81c4a923001ac7804844
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e2363b5087360a489ade363df5d75a1
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature1DExtractor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using Unity.Mathematics;
3 |
4 | namespace MotionMatching
5 | {
6 | public abstract class Feature1DExtractor : ScriptableObject
7 | {
8 | ///
9 | /// Called once at the beginning of the feature extraction process.
10 | ///
13 | /// Called for each pose in the motion clip.
14 | /// StartExtracting(...) is always called once before ExtractFeature(...) is called multiple times.
15 | ///
18 | /// Called when Gizmos are drawn to debug features
19 | /// StartExtracting(...) is not called before DrawGizmos(...)
20 | ///
21 | public abstract void DrawGizmos(float feature, float radius,
22 | float3 characterOrigin, float3 characterForward,
23 | Transform[] joints, Skeleton skeleton);
24 | }
25 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature1DExtractor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: faa8d0855e47b1541adaf7efdee9a21c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature2DExtractor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using Unity.Mathematics;
3 |
4 | namespace MotionMatching
5 | {
6 | public abstract class Feature2DExtractor : ScriptableObject
7 | {
8 | ///
9 | /// Called once at the beginning of the feature extraction process.
10 | ///
13 | /// Called for each pose in the motion clip.
14 | /// StartExtracting(...) is always called once before ExtractFeature(...) is called multiple times.
15 | ///
18 | /// Called when Gizmos are drawn to debug features
19 | /// StartExtracting(...) is not called before DrawGizmos(...)
20 | ///
21 | public abstract void DrawGizmos(float2 feature, float radius,
22 | float3 characterOrigin, float3 characterForward,
23 | Transform[] joints, Skeleton skeleton);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature2DExtractor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: adc577e4554431d49b98eca22099d325
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature3DExtractor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using Unity.Mathematics;
3 |
4 | namespace MotionMatching
5 | {
6 | public abstract class Feature3DExtractor : ScriptableObject
7 | {
8 | ///
9 | /// Called once at the beginning of the feature extraction process.
10 | ///
13 | /// Called for each pose in the motion clip.
14 | /// StartExtracting(...) is always called once before ExtractFeature(...) is called multiple times.
15 | ///
18 | /// Called when Gizmos are drawn to debug features
19 | /// StartExtracting(...) is not called before DrawGizmos(...)
20 | ///
21 | public abstract void DrawGizmos(float3 feature, float radius,
22 | float3 characterOrigin, float3 characterForward,
23 | Transform[] joints, Skeleton skeleton);
24 | }
25 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature3DExtractor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d9c3494fb1ed48f4eb9789fe7ad9deb3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature4DExtractor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using Unity.Mathematics;
3 |
4 | namespace MotionMatching
5 | {
6 | public abstract class Feature4DExtractor : ScriptableObject
7 | {
8 | ///
9 | /// Called once at the beginning of the feature extraction process.
10 | ///
13 | /// Called for each pose in the motion clip.
14 | /// StartExtracting(...) is always called once before ExtractFeature(...) is called multiple times.
15 | ///
18 | /// Called when Gizmos are drawn to debug features
19 | /// StartExtracting(...) is not called before DrawGizmos(...)
20 | ///
21 | public abstract void DrawGizmos(float4 feature, float radius,
22 | float3 characterOrigin, float3 characterForward,
23 | Transform[] joints, Skeleton skeleton);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/Feature4DExtractor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f487fc9865e9d54c9a22bc1af5ef72c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/FeatureDebug.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b202464d618fda64a9e4a8cb8516acc6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/FeatureSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 42319d84af98f00499db10814908850b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Features/FeatureSet.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c0443bbf7d0e4b3468a5b193f45f1d12
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/IK.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 57c5e870d3d6f0340b55a07a18aa0f7e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/IK/TwoJointIK.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using Unity.Mathematics;
4 | using UnityEngine;
5 |
6 | namespace MotionMatching
7 | {
8 | public static class TwoJointIK
9 | {
10 | ///
11 | /// Solve 2-joint IK considering target as end effector for the joint c.
12 | /// It is not limited to legs, but for example:
13 | /// a can be seen as the root/hips, b as the knee, c as the ankle,
14 | /// and the forward can be seen as the knee forward.
15 | ///
16 | public static void Solve(float3 targetPos, Transform jointA, Transform jointB, Transform jointC, float3 forward)
17 | {
18 | float lengthAB = math.distance(jointA.position, jointB.position);
19 | float lengthBC = math.distance(jointB.position, jointC.position);
20 |
21 | float3 aPos = jointA.position;
22 | float3 bPos = jointB.position;
23 | float3 cPos = jointC.position;
24 |
25 | if (math.lengthsq(targetPos - (float3)jointC.position) < 0.001f * 0.001f) return;
26 |
27 | float lengthAT = GetLengthAT(targetPos, aPos, lengthAB, lengthBC);
28 | if (math.length(targetPos - aPos) > lengthAT)
29 | {
30 | targetPos = aPos + math.normalize(targetPos - aPos) * lengthAT;
31 | }
32 | float3 axisAC = math.normalize(cPos - aPos);
33 | forward = math.normalize(forward);
34 | float3 rotationAxis = math.normalize(math.cross(axisAC, forward));
35 | // First make the vector AC have the same length as AT
36 | // Use the dot product formula to obtain interior angles
37 | float interiorAngleA = math.acos(math.clamp( // clamp to avoid numerical errors
38 | math.dot(
39 | axisAC,
40 | math.normalize(bPos - aPos)),
41 | -1f, 1f));
42 | float interiorAngleB = math.acos(math.clamp(
43 | math.dot(
44 | math.normalize(aPos - bPos),
45 | math.normalize(cPos - bPos)),
46 | -1f, 1f));
47 | // Use the cosine rule to get the desired interior angles
48 | Debug.Assert(!float.IsNaN(math.acos(math.clamp((lengthBC * lengthBC - lengthAB * lengthAB - lengthAT * lengthAT) / (-2f * lengthAB * lengthAT), -1f, 1f))), "Numerical error");
49 | Debug.Assert(!float.IsNaN(math.acos(math.clamp((lengthAT * lengthAT - lengthAB * lengthAB - lengthBC * lengthBC) / (-2f * lengthAB * lengthBC), -1f, 1f))), "Numerical error");
50 | float desiredInteriorAngleA = math.acos(math.clamp((lengthBC * lengthBC - lengthAB * lengthAB - lengthAT * lengthAT) / (-2f * lengthAB * lengthAT), -1f, 1f));
51 | float desiredInteriorAngleB = math.acos(math.clamp((lengthAT * lengthAT - lengthAB * lengthAB - lengthBC * lengthBC) / (-2f * lengthAB * lengthBC), -1f, 1f));
52 | // Local rotation angles for A and B
53 | quaternion rotA = quaternion.AxisAngle(math.mul(math.inverse(jointA.rotation), rotationAxis), desiredInteriorAngleA - interiorAngleA); // mul by the inverse to make it joint local space
54 | quaternion rotB = quaternion.AxisAngle(math.mul(math.inverse(jointB.rotation), rotationAxis), desiredInteriorAngleB - interiorAngleB);
55 | // Now we have the leg rotated so that the vector AC has the same length as AT
56 | // Then, we rotate A by the rotation axis formed by cross product of AC and AT
57 | // First, angle between AC and AT
58 | float3 axisAT = math.normalize(targetPos - aPos);
59 | float angleACAT = math.acos(math.clamp(
60 | math.dot(
61 | axisAC,
62 | axisAT),
63 | -1f, 1f));
64 | float3 rotationAxisACAT = math.normalize(math.cross(axisAC, axisAT));
65 | quaternion rotA2 = quaternion.AxisAngle(math.mul(math.inverse(jointA.rotation), rotationAxisACAT), angleACAT);
66 | // Apply the rotations
67 | jointA.rotation = math.mul(jointA.rotation, math.mul(rotA2, rotA));
68 | jointB.rotation = math.mul(jointB.rotation, rotB);
69 | }
70 |
71 | private static float GetLengthAT(float3 targetPos, float3 aPos, float lengthAB, float lengthBC)
72 | {
73 | const float epsilon = 0.001f;
74 | return math.clamp(math.distance(aPos, targetPos), epsilon, lengthAB + lengthBC - epsilon);
75 | }
76 | }
77 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/IK/TwoJointIK.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a2cce8cf33685b84d8daba7a58f790aa
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Inertialization.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 742f2a8cf3cb3a141bc1d8e44764ba7b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Inertialization/Inertialization.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 34351c9bfcdc0784a9cf7d8cea8c5961
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/JLPM.MotionMatching.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "JLPM.MotionMatching",
3 | "rootNamespace": "",
4 | "references": [
5 | "Unity.Burst",
6 | "Unity.Mathematics",
7 | "Unity.InputSystem",
8 | "Unity.Splines"
9 | ],
10 | "includePlatforms": [],
11 | "excludePlatforms": [],
12 | "allowUnsafeCode": true,
13 | "overrideReferences": false,
14 | "precompiledReferences": [],
15 | "autoReferenced": true,
16 | "defineConstraints": [],
17 | "versionDefines": [],
18 | "noEngineReferences": false
19 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/JLPM.MotionMatching.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c35adfee13b3cd458f7e1352d6986b6
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0c0592f713744634d901f1ab7d861911
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose/PoseExtractor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: de4325491266b36449a0ec26d62c7a8a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose/PoseSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d6d9f81a981d2e24c9f7c249d02a84b4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose/PoseSet.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14a805e8c4461b54fb3ff672316243eb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose/PoseVector.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using Unity.Mathematics;
5 | using static Unity.Mathematics.math;
6 |
7 | namespace MotionMatching
8 | {
9 | ///
10 | /// Stores full pose representation for one pose
11 | ///
12 | public struct PoseVector
13 | {
14 | // The first element is the SimulationBone (added artificially), and the rest are the bones of the original skeleton
15 | public float3[] JointLocalPositions;
16 | public quaternion[] JointLocalRotations;
17 | public float3[] JointLocalVelocities; // Computed from World Positions
18 | public float3[] JointLocalAngularVelocities; // Computed from World Rotations
19 | public bool LeftFootContact; // True if the foot is in contact with the ground, false otherwise
20 | public bool RightFootContact;
21 |
22 | public PoseVector(float3[] jointLocalPositions, quaternion[] jointLocalRotations,
23 | float3[] jointLocalVelocities, float3[] jointLocalAngularVelocities,
24 | bool leftFootContact, bool rightFootContact)
25 | {
26 | JointLocalPositions = jointLocalPositions;
27 | JointLocalRotations = jointLocalRotations;
28 | JointLocalVelocities = jointLocalVelocities;
29 | JointLocalAngularVelocities = jointLocalAngularVelocities;
30 | LeftFootContact = leftFootContact;
31 | RightFootContact = rightFootContact;
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose/PoseVector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a13987dc9a5bd4c40bd4b8db3d89027e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose/Skeleton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | namespace MotionMatching
7 | {
8 | public class Skeleton
9 | {
10 | public List Joints { get; private set; }
11 |
12 | public Skeleton()
13 | {
14 | Joints = new List();
15 | }
16 |
17 | public void AddJoint(Joint joint)
18 | {
19 | Joints.Add(joint);
20 | }
21 |
22 | public bool Find(HumanBodyBones type, out Joint joint)
23 | {
24 | for (int i = 0; i < Joints.Count; i++)
25 | {
26 | if (Joints[i].Type == type)
27 | {
28 | joint = Joints[i];
29 | return true;
30 | }
31 | }
32 | joint = new Joint();
33 | return false;
34 | }
35 |
36 | public bool Find(string jointName, out Joint joint)
37 | {
38 | for (int i = 0; i < Joints.Count; i++)
39 | {
40 | if (Joints[i].Name == jointName)
41 | {
42 | joint = Joints[i];
43 | return true;
44 | }
45 | }
46 | joint = new Joint();
47 | return true;
48 | }
49 |
50 | public Joint GetParent(Joint joint)
51 | {
52 | return Joints[joint.ParentIndex];
53 | }
54 |
55 | public struct Joint : IEquatable
56 | {
57 | public string Name;
58 | public int Index;
59 | public int ParentIndex; // 0 - Root
60 | public Vector3 LocalOffset;
61 | public HumanBodyBones Type;
62 |
63 | public Joint(string name, int index, int parentIndex, Vector3 localOffset)
64 | {
65 | Name = name;
66 | Index = index;
67 | ParentIndex = parentIndex;
68 | LocalOffset = localOffset;
69 | Type = HumanBodyBones.LastBone;
70 | }
71 |
72 | public Joint(string name, int index, int parentIndex, Vector3 localOffset, HumanBodyBones type)
73 | {
74 | Name = name;
75 | Index = index;
76 | ParentIndex = parentIndex;
77 | LocalOffset = localOffset;
78 | Type = type;
79 | }
80 |
81 | public bool Equals(Joint other)
82 | {
83 | return Name == other.Name && Index == other.Index && ParentIndex == other.ParentIndex && LocalOffset == other.LocalOffset && Type == other.Type;
84 | }
85 | }
86 | }
87 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Pose/Skeleton.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7d2292385b42d974a9a03714338be8b7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a56cf9704c0f8345ac64b19be6e78d7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/AnimationData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using static UnityEngine.GraphicsBuffer;
5 | #if UNITY_EDITOR
6 | using UnityEditor;
7 | using UnityEditor.SceneManagement;
8 | #endif
9 |
10 | namespace MotionMatching
11 | {
12 | ///
13 | /// Defines an animation used by MotionMatchingData.
14 | /// Single representation of an animation clip (or mocap file).
15 | /// It also stores metadata such as tags.
16 | ///
17 | [CreateAssetMenu(fileName = "AnimationData", menuName = "MotionMatching/AnimationData")]
18 | public class AnimationData : ScriptableObject
19 | {
20 | public TextAsset BVH;
21 | public float UnitScale = 1.0f;
22 | public List Tags = new();
23 |
24 | private BVHAnimation Animation;
25 |
26 | public void Import()
27 | {
28 | BVHImporter importer = new BVHImporter();
29 | Animation = importer.Import(BVH, UnitScale);
30 | }
31 |
32 | public BVHAnimation GetAnimation()
33 | {
34 | if (Animation == null)
35 | {
36 | Import();
37 | }
38 | return Animation;
39 | }
40 |
41 | public List GetTags()
42 | {
43 | return Tags;
44 | }
45 |
46 | public void AddTag(string name)
47 | {
48 | Tag newTag = new Tag
49 | {
50 | Name = name
51 | };
52 | Tags.Add(newTag);
53 | #if UNITY_EDITOR
54 | SaveEditor();
55 | #endif
56 | }
57 |
58 | public void RemoveTag(int index)
59 | {
60 | for (int i = index + 1; i < Tags.Count; ++i)
61 | {
62 | Tags[i - 1] = Tags[i];
63 | }
64 | Tags.RemoveAt(Tags.Count - 1);
65 | #if UNITY_EDITOR
66 | SaveEditor();
67 | #endif
68 | }
69 |
70 | public void UpdateMecanimInformation(MotionMatchingData mmData)
71 | {
72 | Animation.UpdateMecanimInformation(mmData);
73 | }
74 |
75 | [System.Serializable]
76 | public struct Tag
77 | {
78 | public string Name;
79 | public int[] Start; // Each element with index i, where, 0 <= i <= Start.Length == End.Length
80 | public int[] End; // represents a range. That is, for an arbitrary i -> [Start[i], End[i]]
81 | }
82 |
83 | #if UNITY_EDITOR
84 | public void SaveEditor()
85 | {
86 | EditorUtility.SetDirty(this);
87 | }
88 | #endif
89 | }
90 |
91 | #if UNITY_EDITOR
92 | [CustomEditor(typeof(AnimationData))]
93 | public class AnimationDataEditor : Editor
94 | {
95 | private bool TagsFoldout;
96 |
97 | public override void OnInspectorGUI()
98 | {
99 | AnimationData data = (AnimationData)target;
100 |
101 | // BVH
102 | data.BVH = (TextAsset)EditorGUILayout.ObjectField(data.BVH, typeof(TextAsset), false);
103 | // UnitScale
104 | EditorGUILayout.BeginHorizontal();
105 | data.UnitScale = EditorGUILayout.FloatField("Unit Scale", data.UnitScale);
106 | if (GUILayout.Button("m")) data.UnitScale = 1.0f;
107 | if (GUILayout.Button("cm")) data.UnitScale = 0.01f;
108 | if (GUILayout.Button("mm")) data.UnitScale = 0.001f;
109 | EditorGUILayout.EndHorizontal();
110 | // Tags
111 | TagsFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(TagsFoldout, "Tags");
112 | if (TagsFoldout)
113 | {
114 | EditorGUI.indentLevel++;
115 | if (data.Tags == null || data.Tags.Count == 0)
116 | {
117 | EditorGUILayout.HelpBox("To include tags, access the 'MotionMatching/Animation Viewer' window.", MessageType.Info);
118 | }
119 | GUI.enabled = false;
120 | for (int tagIndex = 0; tagIndex < (data.Tags == null ? 0 : data.Tags.Count); ++tagIndex)
121 | {
122 | AnimationData.Tag tag = data.Tags[tagIndex];
123 | tag.Name = EditorGUILayout.TextField(tag.Name);
124 | for (int rangeIndex = 0; rangeIndex < (tag.Start == null ? 0 : tag.Start.Length); ++rangeIndex)
125 | {
126 | EditorGUILayout.BeginHorizontal();
127 | EditorGUILayout.LabelField(tag.Start[rangeIndex].ToString());
128 | EditorGUILayout.LabelField(tag.End[rangeIndex].ToString());
129 | EditorGUILayout.EndHorizontal();
130 | }
131 | }
132 | GUI.enabled = true;
133 | EditorGUI.indentLevel--;
134 | }
135 | EditorGUILayout.EndFoldoutHeaderGroup();
136 | // Save
137 | if (GUI.changed)
138 | {
139 | EditorUtility.SetDirty(target);
140 | EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
141 | }
142 | }
143 | }
144 | #endif
145 | }
146 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/AnimationData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b5cb821b417c4644c970687c3ddeadfc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/AvatarMaskData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 | #if UNITY_EDITOR
4 | using UnityEditor;
5 | using UnityEditor.SceneManagement;
6 | #endif
7 |
8 |
9 | namespace MotionMatching
10 | {
11 | [CreateAssetMenu(fileName = "NewAvatarMaskData", menuName = "MotionMatching/AvatarMaskData")]
12 | public class AvatarMaskData : ScriptableObject
13 | {
14 | [SerializeField]
15 | private bool[] JointEnabled = new bool[BodyJoints.Count];
16 |
17 | public bool IsEnabled(HumanBodyBones joint)
18 | {
19 | return JointEnabled[BodyJoints[joint]];
20 | }
21 |
22 | public void SetEnabled(HumanBodyBones joint, bool b)
23 | {
24 | JointEnabled[BodyJoints[joint]] = b;
25 | }
26 |
27 | public static Dictionary BodyJoints = new Dictionary
28 | {
29 | [HumanBodyBones.Spine] = 0,
30 | [HumanBodyBones.Chest] = 1,
31 | [HumanBodyBones.UpperChest] = 2,
32 |
33 | [HumanBodyBones.Neck] = 3,
34 | [HumanBodyBones.Head] = 4,
35 |
36 | [HumanBodyBones.LeftShoulder] = 5,
37 | [HumanBodyBones.LeftUpperArm] = 6,
38 | [HumanBodyBones.LeftLowerArm] = 7,
39 | [HumanBodyBones.LeftHand] = 8,
40 |
41 | [HumanBodyBones.RightShoulder] = 9,
42 | [HumanBodyBones.RightUpperArm] = 10,
43 | [HumanBodyBones.RightLowerArm] = 11,
44 | [HumanBodyBones.RightHand] = 12,
45 |
46 | [HumanBodyBones.LeftUpperLeg] = 13,
47 | [HumanBodyBones.LeftLowerLeg] = 14,
48 | [HumanBodyBones.LeftFoot] = 15,
49 | [HumanBodyBones.LeftToes] = 16,
50 |
51 | [HumanBodyBones.RightUpperLeg] = 17,
52 | [HumanBodyBones.RightLowerLeg] = 18,
53 | [HumanBodyBones.RightFoot] = 19,
54 | [HumanBodyBones.RightToes] = 20
55 | };
56 | }
57 |
58 | #if UNITY_EDITOR
59 | [CustomEditor(typeof(AvatarMaskData))]
60 | public class AvatarMaskDataEditor : Editor
61 | {
62 | public override void OnInspectorGUI()
63 | {
64 | AvatarMaskData data = (AvatarMaskData)target;
65 |
66 | foreach (HumanBodyBones joint in AvatarMaskData.BodyJoints.Keys)
67 | {
68 | bool b = EditorGUILayout.Toggle(joint.ToString(), data.IsEnabled(joint));
69 | data.SetEnabled(joint, b);
70 | }
71 |
72 | // Save
73 | if (GUI.changed)
74 | {
75 | EditorUtility.SetDirty(target);
76 | EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
77 | }
78 | }
79 | }
80 | #endif
81 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/AvatarMaskData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: faf00fed04a54dd4584cd01ae5f974bf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/MotionMatchingData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d0bb4b3a7b78d847be4e6490640196f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/MotionMatchingSkinnedMeshRenderer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ecd50a3b5b2877946b0977a3fa908fe7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/SimpleMMController.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.TextCore.Text;
3 |
4 | namespace MotionMatching
5 | {
6 | ///
7 | /// This class provides a simple interface to control a character with Motion Matching.
8 | /// Use the SetVelocity function to set the desired velocity of the character.
9 | /// The character will move in the direction of the velocity.
10 | /// The magnitude is used to set the speed of the character.
11 | ///
12 | [DefaultExecutionOrder(-100)]
13 | public class SimpleMMController : MonoBehaviour
14 | {
15 | public MotionMatchingData MotionMatchingData;
16 |
17 | private SpringCharacterController CharacterController;
18 | private MotionMatchingController MMController;
19 | private MotionMatchingSkinnedMeshRenderer SkinnedMeshRenderer;
20 |
21 | private void Awake()
22 | {
23 | CharacterController = GetComponentInChildren();
24 | Debug.Assert(CharacterController != null, "SimpleMMController requires a SpringCharacterController in a children GameObject");
25 | MMController = GetComponentInChildren();
26 | Debug.Assert(MMController != null, "SimpleMMController requires a MotionMatchingController in a children GameObject");
27 | SkinnedMeshRenderer = GetComponentInChildren();
28 | Debug.Assert(SkinnedMeshRenderer != null, "SimpleMMController requires an avatar with a MotionMatchingSkinnedMeshRenderer in a children GameObject");
29 |
30 | MMController.MMData = MotionMatchingData;
31 | MMController.CharacterController = CharacterController;
32 | CharacterController.MotionMatching = MMController;
33 | SkinnedMeshRenderer.MotionMatching = MMController;
34 | }
35 |
36 | ///
37 | /// Use this function to set the desired velocity of the character.
38 | ///
39 | /// The desired direction and speed of the character.
40 | public void SetVelocity(Vector2 velocity)
41 | {
42 | CharacterController.SetMovementDirection(velocity);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Unity/SimpleMMController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e02074c6d110ed34a8c8785b1f684dd3
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f425bb687b3d8b42ab19acbf9c78586
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/BinarySerializerExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using Unity.Mathematics;
5 | using System.IO;
6 |
7 | namespace MotionMatching
8 | {
9 | public class BinarySerializerExtensions
10 | {
11 | public static void WriteFloat2(BinaryWriter writer, float2 value)
12 | {
13 | writer.Write(value.x);
14 | writer.Write(value.y);
15 | }
16 | public static void WriteFloat3(BinaryWriter writer, float3 value)
17 | {
18 | writer.Write(value.x);
19 | writer.Write(value.y);
20 | writer.Write(value.z);
21 | }
22 | public static void WriteFloat4(BinaryWriter writer, float4 value)
23 | {
24 | writer.Write(value.x);
25 | writer.Write(value.y);
26 | writer.Write(value.z);
27 | writer.Write(value.w);
28 | }
29 | public static void WriteQuaternion(BinaryWriter writer, quaternion value)
30 | {
31 | writer.Write(value.value.x);
32 | writer.Write(value.value.y);
33 | writer.Write(value.value.z);
34 | writer.Write(value.value.w);
35 | }
36 | public static void WriteFloat3Array(BinaryWriter writer, float3[] array)
37 | {
38 | foreach (float3 value in array)
39 | {
40 | WriteFloat3(writer, value);
41 | }
42 | }
43 | public static void WriteQuaternionArray(BinaryWriter writer, quaternion[] array)
44 | {
45 | foreach (quaternion value in array)
46 | {
47 | WriteQuaternion(writer, value);
48 | }
49 | }
50 |
51 | public static float2 ReadFloat2(BinaryReader reader)
52 | {
53 | return new float2(reader.ReadSingle(), reader.ReadSingle());
54 | }
55 | public static float3 ReadFloat3(BinaryReader reader)
56 | {
57 | return new float3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle());
58 | }
59 | public static float4 ReadFloat4(BinaryReader reader)
60 | {
61 | return new float4(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle());
62 | }
63 | public static quaternion ReadQuaternion(BinaryReader reader)
64 | {
65 | return new quaternion(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle());
66 | }
67 | public static float3[] ReadFloat3Array(BinaryReader reader, uint length)
68 | {
69 | float3[] array = new float3[length];
70 | for (int i = 0; i < length; i++)
71 | {
72 | array[i] = ReadFloat3(reader);
73 | }
74 | return array;
75 | }
76 | public static quaternion[] ReadQuaternionArray(BinaryReader reader, uint length)
77 | {
78 | quaternion[] array = new quaternion[length];
79 | for (int i = 0; i < length; i++)
80 | {
81 | array[i] = ReadQuaternion(reader);
82 | }
83 | return array;
84 | }
85 | }
86 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/BinarySerializerExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bbc6ad95a6d7e60459d75767f6cebdd8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/GizmosExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 65e91efe3d8dbda43bc6ab791624b0cd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/HumanBodyBonesExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace MotionMatching
6 | {
7 | public static class HumanBodyBonesExtensions
8 | {
9 | public static HumanBodyBones GetMirroredBone(HumanBodyBones bone)
10 | {
11 | Debug.Assert((int)bone < 24 || bone == HumanBodyBones.UpperChest || bone == HumanBodyBones.LastBone, "Fingers are not supported");
12 | switch (bone)
13 | {
14 | case HumanBodyBones.Hips:
15 | return HumanBodyBones.Hips;
16 | case HumanBodyBones.LeftUpperLeg:
17 | return HumanBodyBones.RightUpperLeg;
18 | case HumanBodyBones.RightUpperLeg:
19 | return HumanBodyBones.LeftUpperLeg;
20 | case HumanBodyBones.LeftLowerLeg:
21 | return HumanBodyBones.RightLowerLeg;
22 | case HumanBodyBones.RightLowerLeg:
23 | return HumanBodyBones.LeftLowerLeg;
24 | case HumanBodyBones.LeftFoot:
25 | return HumanBodyBones.RightFoot;
26 | case HumanBodyBones.RightFoot:
27 | return HumanBodyBones.LeftFoot;
28 | case HumanBodyBones.Spine:
29 | return HumanBodyBones.Spine;
30 | case HumanBodyBones.Chest:
31 | return HumanBodyBones.Chest;
32 | case HumanBodyBones.Neck:
33 | return HumanBodyBones.Neck;
34 | case HumanBodyBones.Head:
35 | return HumanBodyBones.Head;
36 | case HumanBodyBones.LeftShoulder:
37 | return HumanBodyBones.RightShoulder;
38 | case HumanBodyBones.RightShoulder:
39 | return HumanBodyBones.LeftShoulder;
40 | case HumanBodyBones.LeftUpperArm:
41 | return HumanBodyBones.RightUpperArm;
42 | case HumanBodyBones.RightUpperArm:
43 | return HumanBodyBones.LeftUpperArm;
44 | case HumanBodyBones.LeftLowerArm:
45 | return HumanBodyBones.RightLowerArm;
46 | case HumanBodyBones.RightLowerArm:
47 | return HumanBodyBones.LeftLowerArm;
48 | case HumanBodyBones.LeftHand:
49 | return HumanBodyBones.RightHand;
50 | case HumanBodyBones.RightHand:
51 | return HumanBodyBones.LeftHand;
52 | case HumanBodyBones.LeftToes:
53 | return HumanBodyBones.RightToes;
54 | case HumanBodyBones.RightToes:
55 | return HumanBodyBones.LeftToes;
56 | case HumanBodyBones.LeftEye:
57 | return HumanBodyBones.RightEye;
58 | case HumanBodyBones.RightEye:
59 | return HumanBodyBones.LeftEye;
60 | case HumanBodyBones.Jaw:
61 | return HumanBodyBones.Jaw;
62 | case HumanBodyBones.UpperChest:
63 | return HumanBodyBones.UpperChest;
64 | default:
65 | return HumanBodyBones.LastBone;
66 | }
67 | }
68 |
69 | ///
70 | /// Returns true if the bone belongs to the right arm (RightUpperArm or RightLowerArm or RightHand)
71 | ///
72 | public static bool IsRightArmBone(HumanBodyBones bone)
73 | {
74 | return bone == HumanBodyBones.RightUpperArm || bone == HumanBodyBones.RightLowerArm || bone == HumanBodyBones.RightHand;
75 | }
76 | ///
77 | /// Returns true if the bone belongs to the left arm (LeftUpperArm or LeftLowerArm or LeftHand)
78 | ///
79 | public static bool IsLeftArmBone(HumanBodyBones bone)
80 | {
81 | return bone == HumanBodyBones.LeftUpperArm || bone == HumanBodyBones.LeftLowerArm || bone == HumanBodyBones.LeftHand;
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/HumanBodyBonesExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a92ce4dec9bda748832b60346981f87
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/MathExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6c9455390d8d99f498e30007206ac583
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/PROFILE.cs:
--------------------------------------------------------------------------------
1 | // Uncomment this line to enable profiling for Motion Matching
2 | //#define PROFILE_MOTION_MATCHING
3 |
4 | using System.Collections;
5 | using System.Collections.Generic;
6 | using UnityEngine;
7 | #if PROFILE_MOTION_MATCHING
8 | using System.Diagnostics;
9 | using Debug = UnityEngine.Debug;
10 | #endif
11 |
12 | namespace MotionMatching
13 | {
14 | public static class PROFILE
15 | {
16 | #if PROFILE_MOTION_MATCHING
17 | private static Dictionary Stopwatches = new Dictionary();
18 | // We need a separated ProfileSamples (instead of using Stopwatches) because we don't know when the ms/ticks will be queried
19 | // it may happen just after a stopwatch has been reseted
20 | private static Dictionary ProfileDatas = new Dictionary();
21 | #endif
22 | // Functions must have empty body if PROFILE_MOTION_MATCHING is not defined
23 | // Compiler will remove them from the build
24 | public static void BEGIN_SAMPLE_PROFILING(string tag)
25 | {
26 | #if PROFILE_MOTION_MATCHING
27 | if (!Stopwatches.TryGetValue(tag, out Stopwatch stopwatch))
28 | {
29 | stopwatch = new Stopwatch();
30 | Stopwatches.Add(tag, stopwatch);
31 | }
32 | stopwatch.Reset();
33 | stopwatch.Start();
34 | #endif
35 | }
36 | public static void END_SAMPLE_PROFILING(string tag)
37 | {
38 | #if PROFILE_MOTION_MATCHING
39 | Stopwatch stopwatch = Stopwatches[tag];
40 | stopwatch.Stop();
41 | if (!ProfileDatas.TryGetValue(tag, out DATA data))
42 | {
43 | data = new DATA();
44 | ProfileDatas.Add(tag, data);
45 | }
46 | data.AddSample((float)stopwatch.Elapsed.TotalMilliseconds, stopwatch.ElapsedTicks);
47 | #endif
48 | }
49 | public static void END_AND_PRINT_SAMPLE_PROFILING(string tag)
50 | {
51 | #if PROFILE_MOTION_MATCHING
52 | END_SAMPLE_PROFILING(tag);
53 | Stopwatch stopwatch = Stopwatches[tag];
54 | Debug.Log("[PROFILER]" + tag + ": " + stopwatch.ElapsedMilliseconds + "ms" + "(" + stopwatch.ElapsedTicks + " ticks)");
55 | #endif
56 | }
57 | public static DATA GET_DATA(string tag)
58 | {
59 | #if PROFILE_MOTION_MATCHING
60 | if (ProfileDatas.ContainsKey(tag))
61 | {
62 | return ProfileDatas[tag];
63 | }
64 | #endif
65 | return null;
66 | }
67 |
68 | ///
69 | /// Use it only for Editor functions, otherwise is better to use a compiler directive such as #define
70 | ///
71 | public static bool IS_PROFILING_ENABLED()
72 | {
73 | #if PROFILE_MOTION_MATCHING
74 | return true;
75 | #endif
76 | #pragma warning disable 162
77 | return false;
78 | }
79 |
80 | public class DATA
81 | {
82 | private static readonly int NumberSamplesToAverage = 60;
83 |
84 | public float MinTicks, MinMs;
85 | public float MaxTicks, MaxMs;
86 | private float AverageTicks, AverageMs;
87 |
88 | private float[] SamplesToAverageMs;
89 | private float[] SamplesToAverageTicks;
90 | private int CurrentSample;
91 | private int AbsoluteCurrentSample;
92 |
93 | public DATA()
94 | {
95 | MinTicks = float.MaxValue;
96 | MinMs = float.MaxValue;
97 | MaxTicks = float.MinValue;
98 | MaxMs = float.MinValue;
99 | AverageTicks = 0;
100 | AverageMs = 0;
101 | SamplesToAverageTicks = new float[NumberSamplesToAverage];
102 | SamplesToAverageMs = new float[NumberSamplesToAverage];
103 | CurrentSample = 0;
104 | }
105 |
106 | public void AddSample(float sampleMs, float sampleTicks)
107 | {
108 | MinTicks = Mathf.Min(MinTicks, sampleTicks);
109 | MinMs = Mathf.Min(MinMs, sampleMs);
110 | MaxTicks = Mathf.Max(MaxTicks, sampleTicks);
111 | MaxMs = Mathf.Max(MaxMs, sampleMs);
112 |
113 | SamplesToAverageTicks[CurrentSample] = sampleTicks;
114 | SamplesToAverageMs[CurrentSample] = sampleMs;
115 | AbsoluteCurrentSample += 1;
116 | CurrentSample = AbsoluteCurrentSample % NumberSamplesToAverage;
117 |
118 | AverageTicks = 0;
119 | AverageMs = 0;
120 | int count = Mathf.Min(AbsoluteCurrentSample, NumberSamplesToAverage);
121 | for (int i = 0; i < count; i++)
122 | {
123 | AverageTicks += SamplesToAverageTicks[i];
124 | AverageMs += SamplesToAverageMs[i];
125 | }
126 | AverageTicks /= count;
127 | AverageMs /= count;
128 | }
129 |
130 | public float GetAverageTicks()
131 | {
132 | return AverageTicks;
133 | }
134 | public float GetAverageMs()
135 | {
136 | return AverageMs;
137 | }
138 | }
139 | }
140 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/PROFILE.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b586011ab1fabc24c9c8dc49ac8a1af5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Runtime/Utils/Spring.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 16c496ea2be392b4bb43c519eecf694c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94e3bee0efad6644aab43613905fd2b1
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/AnimationData.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d84c45ffb5a34e54e87def9cf539a55f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/AnimationData/jl_motionMatching.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: b5cb821b417c4644c970687c3ddeadfc, type: 3}
13 | m_Name: jl_motionMatching
14 | m_EditorClassIdentifier:
15 | BVH: {fileID: 4900000, guid: 1861b3ddede746946859c5bbc1daaad8, type: 3}
16 | UnitScale: 0.01
17 | Tags:
18 | - Name: walk
19 | Start: b302000068140000341f0000b22c00002a380000
20 | End: 3e0b00001c1c0000dc27000001340000d53c0000
21 | - Name: run
22 | Start: 3e0b0000ff1b0000bf270000e4330000
23 | End: 681400005f1f0000cf2c000047380000
24 | - Name: idle
25 | Start: 00000000
26 | End: c1020000
27 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/AnimationData/jl_motionMatching.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae9d4e3ecaf536f4f97794260298b862
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/AnimationData/jl_motionMatching_tpose.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: b5cb821b417c4644c970687c3ddeadfc, type: 3}
13 | m_Name: jl_motionMatching_tpose
14 | m_EditorClassIdentifier:
15 | BVH: {fileID: 4900000, guid: 78dab9649a9f0f542bd0b02cce0f9b54, type: 3}
16 | UnitScale: 0.01
17 | Tags: []
18 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/AnimationData/jl_motionMatching_tpose.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b79200e8b942d6f499ddd01357827bda
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/BVH.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ce787d2d79541a438ed05fbb340ebbd
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/BVH/jl_motionMatching_hd.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1861b3ddede746946859c5bbc1daaad8
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/BVH/jl_motionMatching_tpose.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 78dab9649a9f0f542bd0b02cce0f9b54
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/MMData.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 258de679232118c48bcbf67e33ab7174
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/MMData/JLData.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 5d0bb4b3a7b78d847be4e6490640196f, type: 3}
13 | m_Name: JLData
14 | m_EditorClassIdentifier:
15 | AnimationDatas:
16 | - {fileID: 11400000, guid: ae9d4e3ecaf536f4f97794260298b862, type: 2}
17 | AnimationDataTPose: {fileID: 11400000, guid: b79200e8b942d6f499ddd01357827bda, type: 2}
18 | HipsForwardLocalVector:
19 | x: 0
20 | y: 0.11042806
21 | z: -0.99388444
22 | HipsUpLocalVector:
23 | x: 0
24 | y: 0.99388415
25 | z: 0.11042806
26 | ContactVelocityThreshold: 0.15
27 | SkeletonToMecanim:
28 | - Name: Hips
29 | MecanimBone: 0
30 | - Name: Chest
31 | MecanimBone: 7
32 | - Name: Chest2
33 | MecanimBone: 8
34 | - Name: Chest3
35 | MecanimBone: 54
36 | - Name: Chest4
37 | MecanimBone: 55
38 | - Name: Neck
39 | MecanimBone: 9
40 | - Name: Head
41 | MecanimBone: 10
42 | - Name: RightCollar
43 | MecanimBone: 12
44 | - Name: RightShoulder
45 | MecanimBone: 14
46 | - Name: RightElbow
47 | MecanimBone: 16
48 | - Name: RightWrist
49 | MecanimBone: 18
50 | - Name: LeftCollar
51 | MecanimBone: 11
52 | - Name: LeftShoulder
53 | MecanimBone: 13
54 | - Name: LeftElbow
55 | MecanimBone: 15
56 | - Name: LeftWrist
57 | MecanimBone: 17
58 | - Name: RightHip
59 | MecanimBone: 2
60 | - Name: RightKnee
61 | MecanimBone: 4
62 | - Name: RightAnkle
63 | MecanimBone: 6
64 | - Name: RightToe
65 | MecanimBone: 20
66 | - Name: LeftHip
67 | MecanimBone: 1
68 | - Name: LeftKnee
69 | MecanimBone: 3
70 | - Name: LeftAnkle
71 | MecanimBone: 5
72 | - Name: LeftToe
73 | MecanimBone: 19
74 | TrajectoryFeatures:
75 | - Name: FuturePosition
76 | FeatureType: 0
77 | FramesPrediction: 14000000280000003c000000
78 | SimulationBone: 1
79 | Bone: 0
80 | ZeroX: 0
81 | ZeroY: 1
82 | ZeroZ: 0
83 | FeatureExtractor: {fileID: 0}
84 | - Name: FutureDirection
85 | FeatureType: 1
86 | FramesPrediction: 14000000280000003c000000
87 | SimulationBone: 1
88 | Bone: 0
89 | ZeroX: 0
90 | ZeroY: 1
91 | ZeroZ: 0
92 | FeatureExtractor: {fileID: 0}
93 | PoseFeatures:
94 | - Name: LeftFootPosition
95 | FeatureType: 0
96 | Bone: 5
97 | - Name: LeftFootVelocity
98 | FeatureType: 1
99 | Bone: 5
100 | - Name: RightFootPosition
101 | FeatureType: 0
102 | Bone: 6
103 | - Name: RightFootVelocity
104 | FeatureType: 1
105 | Bone: 6
106 | - Name: HipsVelocity
107 | FeatureType: 1
108 | Bone: 0
109 | JointsLocalForward:
110 | - x: 0
111 | y: 0
112 | z: 1
113 | - x: 0
114 | y: 0.11043152
115 | z: -0.9938837
116 | - x: 0
117 | y: 0
118 | z: -1
119 | - x: 0
120 | y: -0.10151368
121 | z: -0.9948341
122 | - x: 0
123 | y: -0.1016163
124 | z: -0.9948237
125 | - x: 0
126 | y: 0.000000007450581
127 | z: -1
128 | - x: 0
129 | y: 0.21831731
130 | z: -0.9758778
131 | - x: 0
132 | y: 0.058722094
133 | z: -0.9982744
134 | - x: 0
135 | y: 0.000000007450581
136 | z: -1
137 | - x: -0.99999994
138 | y: 4.440892e-16
139 | z: -0.000000059604645
140 | - x: -0.99918795
141 | y: 3.1544536e-10
142 | z: 0.040289782
143 | - x: -0.99999994
144 | y: 4.440892e-16
145 | z: -0.000000059604645
146 | - x: 0
147 | y: 0.000000007450581
148 | z: -1
149 | - x: 0.99999994
150 | y: -4.440892e-16
151 | z: 0.000000059604645
152 | - x: 0.99918795
153 | y: 3.1544445e-10
154 | z: 0.0402899
155 | - x: 0.99999994
156 | y: -4.440892e-16
157 | z: 0.000000059604645
158 | - x: 0
159 | y: 0.04796392
160 | z: -0.9988491
161 | - x: 0
162 | y: 0.08057766
163 | z: -0.9967483
164 | - x: 0
165 | y: -0.000000014901161
166 | z: -1
167 | - x: 0
168 | y: -0.000000014901161
169 | z: -1
170 | - x: 0
171 | y: 0.04802144
172 | z: -0.9988463
173 | - x: 0
174 | y: 0.08121233
175 | z: -0.9966968
176 | - x: 0
177 | y: -0.000000014901161
178 | z: -1
179 | - x: 0
180 | y: -0.000000014901161
181 | z: -1
182 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/MMData/JLData.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8ddcffd587519e840ba105f93050fcf6
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/Other.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be379c439272d1842b7caf358886952f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/Other/EmptyAvatarMaskData.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: faf00fed04a54dd4584cd01ae5f974bf, type: 3}
13 | m_Name: EmptyAvatarMaskData
14 | m_EditorClassIdentifier:
15 | JointEnabled: 000000000000000000000000000000000000000000
16 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/Other/EmptyAvatarMaskData.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f72660f52141b34dbacde90e6fb0cc7
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/Other/LowerBodyAvatarMaskData.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: faf00fed04a54dd4584cd01ae5f974bf, type: 3}
13 | m_Name: LowerBodyAvatarMaskData
14 | m_EditorClassIdentifier:
15 | JointEnabled: 000000000000000000000000000101010101010101
16 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Animations/Other/LowerBodyAvatarMaskData.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a6bccdd3441d37c4f8b39ba775108fbf
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6280cf6b82e461f4eae991003bab6fc7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c7eec989dc50f95489791652126b4c6a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Materials/GroundMat.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 830b230ce1e893b4ea0e42f951e65bcc
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 23355e63ab7e9574c80f07c43cbc4cee
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d3870682c276e2144a51b8181adf186c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Diffuse.png
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Diffuse.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0a4a6231a69779d429e2f396b20ba6d6
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 0
40 | wrapV: 0
41 | wrapW: 0
42 | nPOTScale: 1
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 0
55 | spriteTessellationDetail: -1
56 | textureType: 0
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID:
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Glossiness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Glossiness.png
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Glossiness.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6dbd282b084df9046a67f33d878ee578
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 0
40 | wrapV: 0
41 | wrapW: 0
42 | nPOTScale: 1
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 0
55 | spriteTessellationDetail: -1
56 | textureType: 0
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID:
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Normal.png
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Normal.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bf6a1da2733514b45a8d7e9405b54fb8
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 0
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 0
40 | wrapV: 0
41 | wrapW: 0
42 | nPOTScale: 1
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 0
55 | spriteTessellationDetail: -1
56 | textureType: 1
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID:
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Specular.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Specular.png
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1001_Specular.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 238ce5b2c22f8844497d2594ea690893
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 0
40 | wrapV: 0
41 | wrapW: 0
42 | nPOTScale: 1
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 0
55 | spriteTessellationDetail: -1
56 | textureType: 0
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID:
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1002_Diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1002_Diffuse.png
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1002_Diffuse.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fd3747ee41a1df5409da66924e7c36bc
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 0
40 | wrapV: 0
41 | wrapW: 0
42 | nPOTScale: 1
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 0
55 | spriteTessellationDetail: -1
56 | textureType: 0
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID:
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1002_Normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1002_Normal.png
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_1002_Normal.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d7919419ec607f4b80e71138cab608f
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 0
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 0
40 | wrapV: 0
41 | wrapW: 0
42 | nPOTScale: 1
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 0
55 | spriteTessellationDetail: -1
56 | textureType: 1
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID:
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_body.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 23a648e466ab7bb4b8aadb470cf63f57
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Ch33_hair.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c45ed9a176b85bb4780bbc6962076e07
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Joe.fbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Joe.fbx
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Models/Joe/Joe.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 17d2ceb469f508a47ade33a62a335e9d
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc45f2992c90fea42a64c3f39de7f980
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/Prefabs/SimpleMMController.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73e26935d43c8b843afeb3ee8c3558ea
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/UnityAnimations.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d69e19026132b6449ab6364c2b3360e0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/UnityAnimations/ExampleAnimController.controller:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!91 &9100000
4 | AnimatorController:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_Name: ExampleAnimController
10 | serializedVersion: 5
11 | m_AnimatorParameters: []
12 | m_AnimatorLayers:
13 | - serializedVersion: 5
14 | m_Name: Base Layer
15 | m_StateMachine: {fileID: 2376804570371839566}
16 | m_Mask: {fileID: 0}
17 | m_Motions: []
18 | m_Behaviours: []
19 | m_BlendingMode: 0
20 | m_SyncedLayerIndex: -1
21 | m_DefaultWeight: 0
22 | m_IKPass: 0
23 | m_SyncedLayerAffectsTiming: 0
24 | m_Controller: {fileID: 9100000}
25 | --- !u!1107 &2376804570371839566
26 | AnimatorStateMachine:
27 | serializedVersion: 6
28 | m_ObjectHideFlags: 1
29 | m_CorrespondingSourceObject: {fileID: 0}
30 | m_PrefabInstance: {fileID: 0}
31 | m_PrefabAsset: {fileID: 0}
32 | m_Name: Base Layer
33 | m_ChildStates:
34 | - serializedVersion: 1
35 | m_State: {fileID: 5943263004468232296}
36 | m_Position: {x: 360, y: 140, z: 0}
37 | m_ChildStateMachines: []
38 | m_AnyStateTransitions: []
39 | m_EntryTransitions: []
40 | m_StateMachineTransitions: {}
41 | m_StateMachineBehaviours: []
42 | m_AnyStatePosition: {x: 50, y: 20, z: 0}
43 | m_EntryPosition: {x: 50, y: 120, z: 0}
44 | m_ExitPosition: {x: 800, y: 120, z: 0}
45 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
46 | m_DefaultState: {fileID: 5943263004468232296}
47 | --- !u!1102 &5943263004468232296
48 | AnimatorState:
49 | serializedVersion: 6
50 | m_ObjectHideFlags: 1
51 | m_CorrespondingSourceObject: {fileID: 0}
52 | m_PrefabInstance: {fileID: 0}
53 | m_PrefabAsset: {fileID: 0}
54 | m_Name: Dance
55 | m_Speed: 0.5
56 | m_CycleOffset: 0
57 | m_Transitions: []
58 | m_StateMachineBehaviours: []
59 | m_Position: {x: 50, y: 50, z: 0}
60 | m_IKOnFeet: 0
61 | m_WriteDefaultValues: 1
62 | m_Mirror: 0
63 | m_SpeedParameterActive: 0
64 | m_MirrorParameterActive: 0
65 | m_CycleOffsetParameterActive: 0
66 | m_TimeParameterActive: 0
67 | m_Motion: {fileID: -203655887218126122, guid: f772bca018a4d284b955e00b861ad43e,
68 | type: 3}
69 | m_Tag:
70 | m_SpeedParameter:
71 | m_MirrorParameter:
72 | m_CycleOffsetParameter:
73 | m_TimeParameter:
74 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/UnityAnimations/ExampleAnimController.controller.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4187bfeb243a1734e9bc7c8084382bc4
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 9100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Assets/UnityAnimations/HipHopDancing.fbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JLPM22/MotionMatching/6b4b6bff117bfd715364e21cffc9a8bcef9e97cf/com.jlpm.motionmatching/Samples~/Examples/Assets/UnityAnimations/HipHopDancing.fbx
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 590e77f70145e0c4b87c39da8c47f4bb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/00_Basic.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 482b265d17eaeca4ebc2b8036c82d7f3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/00_Basic/ExampleSimpleMMController.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 935f3d233ab3d8c47b566260ef9962ab
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/00_Basic/ExampleSplines.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 61097bb48f0801b49b7718095121188b
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/01_Advanced.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e5b7f4ee35018ad43870eef079c3aeb6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/01_Advanced/ExampleColliders.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7303debc7262ed441b2ac520929cb4bf
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/01_Advanced/ExampleFeatureVisualization.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b5e2fcd250f0c2649950c4815c42c83e
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/01_Advanced/ExamplePathTest.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 910a9f7fe7f2ede419c9731b946c70bc
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/01_Advanced/ExampleTags.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 12e231566c4c6a844b27d609fe00b40c
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/01_Advanced/ExampleThirdPerson.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b6cf897081ca22e4ea09432b6d90b690
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scenes/01_Advanced/ExampleUnityAnimationIntegration.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ecd11e44a9f2544a8b3e7610c9caaf5
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c0e8cc17e21108c4a86defe1c0004dcf
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Camera.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 072918262ecfa644483e5e9c1d910a3f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Camera/FollowCamera.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | public class FollowCamera : MonoBehaviour
6 | {
7 | public Transform Target;
8 | public Vector3 Offset;
9 | public float Smooth = 1;
10 |
11 | private Vector3 SmoothVelocity;
12 |
13 | private void Update()
14 | {
15 | if (Target != null)
16 | {
17 | transform.position = Vector3.SmoothDamp(transform.position, Target.position + Offset, ref SmoothVelocity, Smooth * Time.deltaTime);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Camera/FollowCamera.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 162be647966894d4f8014324564c865a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Custom.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cc99a8d65ad724a4ea85fd0c49b04404
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Custom/Custom2DFeatureExtractor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using MotionMatching;
3 | using Unity.Mathematics;
4 |
5 | /*
6 | This is an example class of a custom feature extractor for two-dimensional features.
7 | This class extracts the 2D position of the head joint in the local space of the character.
8 | */
9 | [CreateAssetMenu(fileName = "NewCustom2DFeatureExtractor", menuName = "Custom/Custom2DFeatureExtractor")]
10 | public class Custom2DFeatureExtractor : Feature2DExtractor
11 | {
12 | private Skeleton.Joint HeadJoint;
13 |
14 | // This function is called once at the beginning of the extraction process.
15 | public override void StartExtracting(Skeleton skeleton)
16 | {
17 | bool found = skeleton.Find(HumanBodyBones.Head, out HeadJoint);
18 | Debug.Assert(found, "Head Joint could not be found");
19 | }
20 |
21 | // This function is called for each pose in the pose database.
22 | public override float2 ExtractFeature(PoseVector pose, int poseIndex, int animationClip, Skeleton skeleton, float3 characterOrigin, float3 characterForward)
23 | {
24 | float3 worldPos = FeatureSet.GetWorldPosition(skeleton, pose, HeadJoint);
25 | float3 localPos = FeatureSet.GetLocalPositionFromCharacter(worldPos, characterOrigin, characterForward);
26 | return localPos.xz;
27 | }
28 |
29 | // This function is called when features are visualized during gizmo drawing. It can be left empty if visualization is not needed.
30 | public override void DrawGizmos(float2 feature, float radius, float3 characterOrigin, float3 characterForward, Transform[] joints, Skeleton skeleton)
31 | {
32 | bool found = skeleton.Find(HumanBodyBones.Head, out HeadJoint);
33 | Debug.Assert(found, "Head Joint could not be found");
34 | float3 headPos = joints[HeadJoint.Index].position;
35 | headPos.x = feature.x;
36 | headPos.z = feature.y;
37 | quaternion characterRot = quaternion.LookRotation(characterForward, new float3(0, 1, 0));
38 | float3 worldHeadPos = characterOrigin + math.mul(characterRot, headPos);
39 | GizmosExtensions.DrawWireSphere(worldHeadPos, radius);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Custom/Custom2DFeatureExtractor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5b229f7734a25da4eadd423369381fbf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 805b8709934ada941b40a1794cc459bd
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/InputCharacterController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using MotionMatching;
5 |
6 | [RequireComponent(typeof(InputManager))]
7 | ///
8 | /// This class listents to InputManager and input the desired information to SpringCharacterController.
9 | ///
10 | public class InputCharacterController : MonoBehaviour
11 | {
12 | private InputManager Input;
13 | private SpringCharacterController CharacterController;
14 | private CollisionsSpringCharacterController CollisionsCharacterController;
15 | private TagSwitchHelper TagHelper;
16 |
17 | private void Awake()
18 | {
19 | Input = GetComponent();
20 | CharacterController = GetComponent();
21 | CollisionsCharacterController = GetComponent();
22 | TagHelper = GetComponent();
23 | }
24 |
25 | private void OnEnable()
26 | {
27 | Input.OnMovementDirectionChanged += OnMovementDirectionChanged;
28 | Input.OnFixOrientationSwap += OnFixOrientationSwap;
29 | Input.OnSwitchTag += OnSwitchTag;
30 | }
31 |
32 | private void OnDisable()
33 | {
34 | Input.OnMovementDirectionChanged -= OnMovementDirectionChanged;
35 | Input.OnFixOrientationSwap -= OnFixOrientationSwap;
36 | Input.OnSwitchTag -= OnSwitchTag;
37 | }
38 |
39 | public void OnMovementDirectionChanged(Vector2 movementDirection)
40 | {
41 | if (CharacterController != null)
42 | {
43 | CharacterController.SetMovementDirection(movementDirection);
44 | }
45 | if (CollisionsCharacterController != null)
46 | {
47 | CollisionsCharacterController.SetMovementDirection(movementDirection);
48 | }
49 | }
50 |
51 | public void OnFixOrientationSwap()
52 | {
53 | if (CharacterController != null)
54 | {
55 | CharacterController.SwapFixOrientation();
56 | }
57 | if (CollisionsCharacterController != null)
58 | {
59 | CollisionsCharacterController.SwapFixOrientation();
60 | }
61 | }
62 |
63 | public void OnSwitchTag()
64 | {
65 | if (TagHelper != null)
66 | {
67 | if (TagHelper.IsQuerySet)
68 | {
69 | TagHelper.DisableQuery();
70 | }
71 | else
72 | {
73 | TagHelper.UpdateQuery();
74 | }
75 | }
76 | }
77 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/InputCharacterController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 366f437fc25847f46b850e77ce58dd87
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/InputManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | using UnityEngine.InputSystem;
6 |
7 | ///
8 | /// Class responsible for wrapping the input from the generated C# class from the new Unity's Input System.
9 | ///
10 | public class InputManager : MonoBehaviour
11 | {
12 | public event Action OnMovementDirectionChanged; // Vector2 with the direction of movement
13 | public event Action OnFixOrientationSwap; // Called when the orientation is fixed/unfixed
14 | public event Action OnSwitchTag; // Called when the query tag expression is enabled/disabled
15 |
16 | private PlayerInput Input;
17 |
18 | private void Awake()
19 | {
20 | Input = new PlayerInput();
21 | }
22 |
23 | private void OnEnable()
24 | {
25 | Input.Player.Enable();
26 | Input.Player.Movement.performed += OnMovementPerformed;
27 | Input.Player.FixOrientation.performed += OnFixOrientationSwapPerformed;
28 | Input.Player.SwitchTag.performed += OnSwitchTagPerformed;
29 | }
30 |
31 | private void OnDisable()
32 | {
33 | Input.Player.Disable();
34 | Input.Player.Movement.performed -= OnMovementPerformed;
35 | Input.Player.FixOrientation.performed -= OnFixOrientationSwapPerformed;
36 | Input.Player.SwitchTag.performed -= OnSwitchTagPerformed;
37 | }
38 |
39 | private void OnMovementPerformed(InputAction.CallbackContext context)
40 | {
41 | Vector2 direction = context.ReadValue();
42 | if (OnMovementDirectionChanged != null) OnMovementDirectionChanged(direction);
43 | }
44 |
45 | private void OnFixOrientationSwapPerformed(InputAction.CallbackContext context)
46 | {
47 | if (OnFixOrientationSwap != null) OnFixOrientationSwap();
48 | }
49 |
50 | private void OnSwitchTagPerformed(InputAction.CallbackContext context)
51 | {
52 | if (OnSwitchTag != null) OnSwitchTag();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/InputManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4214c09160b148640afde91a8d0e634f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/PlayerInput.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae6f7af9b7902ff438acf0cc340ea20a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/PlayerInput.inputactions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 83b48d93951fde2418d8b9b6d9d51139
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
11 | generateWrapperCode: 1
12 | wrapperCodePath:
13 | wrapperClassName:
14 | wrapperCodeNamespace:
15 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/SimpleKeyboardInput.cs:
--------------------------------------------------------------------------------
1 | using MotionMatching;
2 | using UnityEngine;
3 | using UnityEngine.InputSystem;
4 |
5 | public class SimpleKeyboardInput : MonoBehaviour
6 | {
7 | public SimpleMMController MMController;
8 |
9 | private void Update()
10 | {
11 | float horizontal = Keyboard.current.aKey.isPressed ? -1 : Keyboard.current.dKey.isPressed ? 1 : 0;
12 | float vertical = Keyboard.current.sKey.isPressed ? -1 : Keyboard.current.wKey.isPressed ? 1 : 0;
13 |
14 | MMController.SetVelocity(new Vector2(horizontal, vertical));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/SimpleKeyboardInput.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a2bb2772d7bc77b43bafd0ad1c77e175
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/SimpleRandomInput.cs:
--------------------------------------------------------------------------------
1 | using MotionMatching;
2 | using UnityEngine;
3 |
4 | public class SimpleRandomInput : MonoBehaviour
5 | {
6 | public SimpleMMController MMController;
7 |
8 | private float Timer = 3.0f;
9 |
10 | private void Update()
11 | {
12 | Timer += Time.deltaTime;
13 |
14 | // Every 3 seconds, generate a new random velocity
15 | if (Timer > 3.0f)
16 | {
17 | float magnitude = Random.Range(0.3f, 1.2f);
18 | MMController.SetVelocity(new Vector2(Random.Range(-1.0f, 1.0f), Random.Range(-1.0f, 1.0f)) * magnitude);
19 | Timer = 0.0f;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Input/SimpleRandomInput.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e054245bd3a336e4bb82debe0ec10752
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Tags.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 21274af1360227c46b651a7e60ea900e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Tags/TagSwitchHelper.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using MotionMatching;
5 |
6 | [RequireComponent(typeof(MotionMatchingCharacterController))]
7 | public class TagSwitchHelper : MonoBehaviour
8 | {
9 | [SerializeField] [Delayed] private string QueryExpression;
10 |
11 | private MotionMatchingCharacterController CharacterController;
12 | private QueryTag CurrentQueryTag;
13 |
14 | public bool IsQuerySet { get; private set; }
15 |
16 | private void Awake()
17 | {
18 | CharacterController = GetComponent();
19 | }
20 |
21 | private void Start()
22 | {
23 | if (QueryExpression != null)
24 | {
25 | UpdateQuery();
26 | }
27 | }
28 |
29 | public void UpdateQuery()
30 | {
31 | Dispose();
32 | if (QueryTag.Parse(QueryExpression, out CurrentQueryTag))
33 | {
34 | CharacterController.MotionMatching.SetQueryTag(CurrentQueryTag);
35 | IsQuerySet = true;
36 | }
37 | else
38 | {
39 | DisableQuery();
40 | IsQuerySet = false;
41 | }
42 | }
43 |
44 | public void DisableQuery()
45 | {
46 | CharacterController.MotionMatching.DisableQueryTag();
47 | IsQuerySet = false;
48 | }
49 |
50 | public void SetExpression(string expression)
51 | {
52 | QueryExpression = expression;
53 | UpdateQuery();
54 | }
55 |
56 | private void Dispose()
57 | {
58 | if (CurrentQueryTag != null) CurrentQueryTag.Dispose();
59 | }
60 |
61 | private void OnDestroy()
62 | {
63 | Dispose();
64 | }
65 |
66 |
67 | #if UNITY_EDITOR
68 | private void OnValidate()
69 | {
70 | if (Application.isPlaying && CharacterController != null)
71 | {
72 | UpdateQuery();
73 | }
74 | }
75 | #endif
76 | }
77 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/Samples~/Examples/Scripts/Tags/TagSwitchHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d4c463597135b44384675fcf727d2e8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.jlpm.motionmatching",
3 | "version": "0.2.5",
4 | "displayName": "Motion Matching",
5 | "description": "Motion Matching implementation for Unity",
6 | "unity": "2020.1",
7 | "documentationUrl": "https://jlpm22.github.io/motionmatching-docs/",
8 | "changelogUrl": "https://github.com/JLPM22/MotionMatching",
9 | "licensesUrl": "https://github.com/JLPM22/MotionMatching#license",
10 | "keywords": [
11 | "animation"
12 | ],
13 | "author": {
14 | "name": "JLPM",
15 | "url": "https://joseluisponton.com/"
16 | },
17 | "dependencies": {
18 | "com.unity.burst": "1.6.4",
19 | "com.unity.inputsystem": "1.3.0",
20 | "com.unity.splines": "2.7.2"
21 | },
22 | "samples": [
23 | {
24 | "displayName": "Examples",
25 | "description": "Contains two working examples on how to use the package for a character controller and a path controller",
26 | "path": "Samples~/Examples"
27 | }
28 | ]
29 | }
--------------------------------------------------------------------------------
/com.jlpm.motionmatching/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5306c088863cbc645b1bb7f56f19df79
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/minimalproject/.gitignore:
--------------------------------------------------------------------------------
1 | # Motion Matching
2 | Samples/
3 | Samples.meta
4 | StreamingAssets/
5 | StreamingAssets.meta
6 |
7 | # Unity
8 | [Ll]ibrary/
9 | [Tt]emp/
10 | [Oo]bj/
11 | [Bb]uild/
12 | [Bb]uilds/
13 | [Ll]ogs/
14 | [Uu]ser[Ss]ettings/
15 |
16 | # Uncomment this line if you wish to ignore the asset store tools plugin
17 | # [Aa]ssets/AssetStoreTools*
18 |
19 | #TODO files
20 | TODO
21 |
22 | # Visual Studio cache directory
23 | .vs/
24 |
25 | # VisualStudioCode
26 | .vscode/
27 | *.vsconfig
28 | UpgradeLog.htm
29 |
30 | # Gradle cache directory
31 | .gradle/
32 |
33 | # Autogenerated VS/MD/Consulo solution and project files
34 | ExportedObj/
35 | .consulo/
36 | *.csproj
37 | *.unityproj
38 | *.sln
39 | *.suo
40 | *.tmp
41 | *.user
42 | *.userprefs
43 | *.pidb
44 | *.booproj
45 | *.svd
46 | *.pdb
47 | *.mdb
48 | *.opendb
49 | *.VC.db
50 |
51 | # Unity3D generated meta files
52 | *.pidb.meta
53 | *.pdb.meta
54 | *.mdb.meta
55 |
56 | # Unity3D generated file on crash reports
57 | sysinfo.txt
58 |
59 | # Builds
60 | *.apk
61 | *.unitypackage
62 |
63 | # Crashlytics generated file
64 | crashlytics-build.properties
65 |
66 | # Created by https://www.toptal.com/developers/gitignore/api/macos
67 | # Edit at https://www.toptal.com/developers/gitignore?templates=macos
68 |
69 | ### macOS ###
70 | # General
71 | .DS_Store
72 | .AppleDouble
73 | .LSOverride
74 |
75 | # Icon must end with two \r
76 | Icon
77 |
78 |
79 | # Thumbnails
80 | ._*
81 |
82 | # Files that might appear in the root of a volume
83 | .DocumentRevisions-V100
84 | .fseventsd
85 | .Spotlight-V100
86 | .TemporaryItems
87 | .Trashes
88 | .VolumeIcon.icns
89 | .com.apple.timemachine.donotpresent
90 |
91 | # Directories potentially created on remote AFP share
92 | .AppleDB
93 | .AppleDesktop
94 | Network Trash Folder
95 | Temporary Items
96 | .apdisk
97 |
98 | ### macOS Patch ###
99 | # iCloud generated files
100 | *.icloud
101 |
102 | # End of https://www.toptal.com/developers/gitignore/api/macos
103 |
--------------------------------------------------------------------------------
/minimalproject/Assets/New Scene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f6a5a73ddca4b0942a8c45eafaf50586
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 709f11a7f3c4041caa4ef136ea32d874
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/DefaultVolumeProfile.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b597f82a24a2d104ebdb87f6bd13e415
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/Lighting Settings.lighting:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!850595691 &4890085278179872738
4 | LightingSettings:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_Name: Lighting Settings
10 | serializedVersion: 4
11 | m_GIWorkflowMode: 1
12 | m_EnableBakedLightmaps: 0
13 | m_EnableRealtimeLightmaps: 0
14 | m_RealtimeEnvironmentLighting: 1
15 | m_BounceScale: 1
16 | m_AlbedoBoost: 1
17 | m_IndirectOutputScale: 1
18 | m_UsingShadowmask: 1
19 | m_BakeBackend: 1
20 | m_LightmapMaxSize: 1024
21 | m_BakeResolution: 40
22 | m_Padding: 2
23 | m_LightmapCompression: 3
24 | m_AO: 0
25 | m_AOMaxDistance: 1
26 | m_CompAOExponent: 1
27 | m_CompAOExponentDirect: 0
28 | m_ExtractAO: 0
29 | m_MixedBakeMode: 2
30 | m_LightmapsBakeMode: 1
31 | m_FilterMode: 1
32 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
33 | m_ExportTrainingData: 0
34 | m_TrainingDataDestination: TrainingData
35 | m_RealtimeResolution: 2
36 | m_ForceWhiteAlbedo: 0
37 | m_ForceUpdates: 0
38 | m_FinalGather: 0
39 | m_FinalGatherRayCount: 256
40 | m_FinalGatherFiltering: 1
41 | m_PVRCulling: 1
42 | m_PVRSampling: 1
43 | m_PVRDirectSampleCount: 32
44 | m_PVRSampleCount: 512
45 | m_PVREnvironmentSampleCount: 256
46 | m_PVREnvironmentReferencePointCount: 2048
47 | m_LightProbeSampleCountMultiplier: 4
48 | m_PVRBounces: 2
49 | m_PVRMinBounces: 1
50 | m_PVREnvironmentMIS: 1
51 | m_PVRFilteringMode: 1
52 | m_PVRDenoiserTypeDirect: 1
53 | m_PVRDenoiserTypeIndirect: 1
54 | m_PVRDenoiserTypeAO: 1
55 | m_PVRFilterTypeDirect: 0
56 | m_PVRFilterTypeIndirect: 0
57 | m_PVRFilterTypeAO: 0
58 | m_PVRFilteringGaussRadiusDirect: 1
59 | m_PVRFilteringGaussRadiusIndirect: 5
60 | m_PVRFilteringGaussRadiusAO: 2
61 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
62 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
63 | m_PVRFilteringAtrousPositionSigmaAO: 1
64 | m_PVRTiledBaking: 0
65 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/Lighting Settings.lighting.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f18bd8b57305d954b98e7779a7749ab3
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 4890085278179872738
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Balanced-Renderer.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &-1878332245247344467
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3}
13 | m_Name: SSAO
14 | m_EditorClassIdentifier:
15 | m_Active: 1
16 | m_Shader: {fileID: 0}
17 | m_Settings:
18 | Downsample: 1
19 | AfterOpaque: 0
20 | Source: 0
21 | NormalSamples: 0
22 | Intensity: 0.5
23 | DirectLightingStrength: 0.25
24 | Radius: 0.25
25 | SampleCount: 4
26 | --- !u!114 &11400000
27 | MonoBehaviour:
28 | m_ObjectHideFlags: 0
29 | m_CorrespondingSourceObject: {fileID: 0}
30 | m_PrefabInstance: {fileID: 0}
31 | m_PrefabAsset: {fileID: 0}
32 | m_GameObject: {fileID: 0}
33 | m_Enabled: 1
34 | m_EditorHideFlags: 0
35 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
36 | m_Name: URP-Balanced-Renderer
37 | m_EditorClassIdentifier:
38 | debugShaders:
39 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
40 | type: 3}
41 | m_RendererFeatures:
42 | - {fileID: -1878332245247344467}
43 | m_RendererFeatureMap: adc0de57c6d2eee5
44 | m_UseNativeRenderPass: 0
45 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
46 | shaders:
47 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
48 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
49 | screenSpaceShadowPS: {fileID: 0}
50 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
51 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
52 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
53 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
54 | coreBlitPS: {fileID: 0}
55 | coreBlitColorAndDepthPS: {fileID: 0}
56 | cameraMotionVector: {fileID: 0}
57 | objectMotionVector: {fileID: 0}
58 | m_OpaqueLayerMask:
59 | serializedVersion: 2
60 | m_Bits: 4294967295
61 | m_TransparentLayerMask:
62 | serializedVersion: 2
63 | m_Bits: 4294967295
64 | m_DefaultStencilState:
65 | overrideStencilState: 0
66 | stencilReference: 0
67 | stencilCompareFunction: 8
68 | passOperation: 2
69 | failOperation: 0
70 | zFailOperation: 0
71 | m_ShadowTransparentReceive: 1
72 | m_RenderingMode: 0
73 | m_DepthPrimingMode: 0
74 | m_AccurateGbufferNormals: 0
75 | m_ClusteredRendering: 0
76 | m_TileSize: 32
77 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Balanced-Renderer.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e634585d5c4544dd297acaee93dc2beb
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Balanced.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
13 | m_Name: URP-Balanced
14 | m_EditorClassIdentifier:
15 | k_AssetVersion: 12
16 | k_AssetPreviousVersion: 12
17 | m_RendererType: 1
18 | m_RendererData: {fileID: 0}
19 | m_RendererDataList:
20 | - {fileID: 11400000, guid: e634585d5c4544dd297acaee93dc2beb, type: 2}
21 | m_DefaultRendererIndex: 0
22 | m_RequireDepthTexture: 0
23 | m_RequireOpaqueTexture: 0
24 | m_OpaqueDownsampling: 1
25 | m_SupportsTerrainHoles: 1
26 | m_SupportsHDR: 1
27 | m_HDRColorBufferPrecision: 0
28 | m_MSAA: 1
29 | m_RenderScale: 1
30 | m_UpscalingFilter: 0
31 | m_FsrOverrideSharpness: 0
32 | m_FsrSharpness: 0.92
33 | m_EnableLODCrossFade: 1
34 | m_LODCrossFadeDitheringType: 1
35 | m_ShEvalMode: 0
36 | m_LightProbeSystem: 0
37 | m_ProbeVolumeMemoryBudget: 1024
38 | m_ProbeVolumeBlendingMemoryBudget: 256
39 | m_SupportProbeVolumeGPUStreaming: 0
40 | m_SupportProbeVolumeDiskStreaming: 0
41 | m_SupportProbeVolumeScenarios: 0
42 | m_SupportProbeVolumeScenarioBlending: 0
43 | m_ProbeVolumeSHBands: 1
44 | m_MainLightRenderingMode: 1
45 | m_MainLightShadowsSupported: 1
46 | m_MainLightShadowmapResolution: 1024
47 | m_AdditionalLightsRenderingMode: 1
48 | m_AdditionalLightsPerObjectLimit: 2
49 | m_AdditionalLightShadowsSupported: 0
50 | m_AdditionalLightsShadowmapResolution: 512
51 | m_AdditionalLightsShadowResolutionTierLow: 128
52 | m_AdditionalLightsShadowResolutionTierMedium: 256
53 | m_AdditionalLightsShadowResolutionTierHigh: 512
54 | m_ReflectionProbeBlending: 0
55 | m_ReflectionProbeBoxProjection: 0
56 | m_ShadowDistance: 50
57 | m_ShadowCascadeCount: 1
58 | m_Cascade2Split: 0.25
59 | m_Cascade3Split: {x: 0.1, y: 0.3}
60 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
61 | m_CascadeBorder: 0.1
62 | m_ShadowDepthBias: 1
63 | m_ShadowNormalBias: 1
64 | m_AnyShadowsSupported: 1
65 | m_SoftShadowsSupported: 1
66 | m_ConservativeEnclosingSphere: 0
67 | m_NumIterationsEnclosingSphere: 64
68 | m_SoftShadowQuality: 2
69 | m_AdditionalLightsCookieResolution: 512
70 | m_AdditionalLightsCookieFormat: 1
71 | m_UseSRPBatcher: 1
72 | m_SupportsDynamicBatching: 0
73 | m_MixedLightingSupported: 1
74 | m_SupportsLightCookies: 1
75 | m_SupportsLightLayers: 0
76 | m_DebugLevel: 0
77 | m_StoreActionsOptimization: 0
78 | m_UseAdaptivePerformance: 1
79 | m_ColorGradingMode: 0
80 | m_ColorGradingLutSize: 32
81 | m_AllowPostProcessAlphaOutput: 0
82 | m_UseFastSRGBLinearConversion: 0
83 | m_SupportDataDrivenLensFlare: 1
84 | m_SupportScreenSpaceLensFlare: 1
85 | m_GPUResidentDrawerMode: 0
86 | m_SmallMeshScreenPercentage: 0
87 | m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0
88 | m_ShadowType: 1
89 | m_LocalShadowsSupported: 0
90 | m_LocalShadowsAtlasResolution: 256
91 | m_MaxPixelLights: 0
92 | m_ShadowAtlasResolution: 256
93 | m_VolumeFrameworkUpdateMode: 0
94 | m_VolumeProfile: {fileID: 0}
95 | apvScenesData:
96 | obsoleteSceneBounds:
97 | m_Keys: []
98 | m_Values: []
99 | obsoleteHasProbeVolumes:
100 | m_Keys: []
101 | m_Values:
102 | m_PrefilteringModeMainLightShadows: 1
103 | m_PrefilteringModeAdditionalLight: 4
104 | m_PrefilteringModeAdditionalLightShadows: 1
105 | m_PrefilterXRKeywords: 0
106 | m_PrefilteringModeForwardPlus: 1
107 | m_PrefilteringModeDeferredRendering: 1
108 | m_PrefilteringModeScreenSpaceOcclusion: 1
109 | m_PrefilterDebugKeywords: 0
110 | m_PrefilterWriteRenderingLayers: 0
111 | m_PrefilterHDROutput: 0
112 | m_PrefilterAlphaOutput: 0
113 | m_PrefilterSSAODepthNormals: 0
114 | m_PrefilterSSAOSourceDepthLow: 0
115 | m_PrefilterSSAOSourceDepthMedium: 0
116 | m_PrefilterSSAOSourceDepthHigh: 0
117 | m_PrefilterSSAOInterleaved: 0
118 | m_PrefilterSSAOBlueNoise: 0
119 | m_PrefilterSSAOSampleCountLow: 0
120 | m_PrefilterSSAOSampleCountMedium: 0
121 | m_PrefilterSSAOSampleCountHigh: 0
122 | m_PrefilterDBufferMRT1: 0
123 | m_PrefilterDBufferMRT2: 0
124 | m_PrefilterDBufferMRT3: 0
125 | m_PrefilterSoftShadowsQualityLow: 0
126 | m_PrefilterSoftShadowsQualityMedium: 0
127 | m_PrefilterSoftShadowsQualityHigh: 0
128 | m_PrefilterSoftShadows: 0
129 | m_PrefilterScreenCoord: 0
130 | m_PrefilterNativeRenderPass: 0
131 | m_PrefilterUseLegacyLightmaps: 0
132 | m_ShaderVariantLogLevel: 0
133 | m_ShadowCascades: 0
134 | m_Textures:
135 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
136 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
137 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Balanced.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e1260c1148f6143b28bae5ace5e9c5d1
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-HighFidelity-Renderer.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &-1878332245247344467
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3}
13 | m_Name: SSAO
14 | m_EditorClassIdentifier:
15 | m_Active: 1
16 | m_Settings:
17 | AOMethod: 1
18 | Downsample: 0
19 | AfterOpaque: 0
20 | Source: 1
21 | NormalSamples: 1
22 | Intensity: 0.5
23 | DirectLightingStrength: 0.25
24 | Radius: 0.25
25 | Samples: 0
26 | BlurQuality: 0
27 | Falloff: 100
28 | SampleCount: -1
29 | m_BlueNoise256Textures:
30 | - {fileID: 2800000, guid: 36f118343fc974119bee3d09e2111500, type: 3}
31 | - {fileID: 2800000, guid: 4b7b083e6b6734e8bb2838b0b50a0bc8, type: 3}
32 | - {fileID: 2800000, guid: c06cc21c692f94f5fb5206247191eeee, type: 3}
33 | - {fileID: 2800000, guid: cb76dd40fa7654f9587f6a344f125c9a, type: 3}
34 | - {fileID: 2800000, guid: e32226222ff144b24bf3a5a451de54bc, type: 3}
35 | - {fileID: 2800000, guid: 3302065f671a8450b82c9ddf07426f3a, type: 3}
36 | - {fileID: 2800000, guid: 56a77a3e8d64f47b6afe9e3c95cb57d5, type: 3}
37 | m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3}
38 | --- !u!114 &11400000
39 | MonoBehaviour:
40 | m_ObjectHideFlags: 0
41 | m_CorrespondingSourceObject: {fileID: 0}
42 | m_PrefabInstance: {fileID: 0}
43 | m_PrefabAsset: {fileID: 0}
44 | m_GameObject: {fileID: 0}
45 | m_Enabled: 1
46 | m_EditorHideFlags: 0
47 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
48 | m_Name: URP-HighFidelity-Renderer
49 | m_EditorClassIdentifier:
50 | debugShaders:
51 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
52 | type: 3}
53 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
54 | probeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 53626a513ea68ce47b59dc1299fe3959,
55 | type: 3}
56 | probeVolumeResources:
57 | probeVolumeDebugShader: {fileID: 0}
58 | probeVolumeFragmentationDebugShader: {fileID: 0}
59 | probeVolumeOffsetDebugShader: {fileID: 0}
60 | probeVolumeSamplingDebugShader: {fileID: 0}
61 | probeSamplingDebugMesh: {fileID: 0}
62 | probeSamplingDebugTexture: {fileID: 0}
63 | probeVolumeBlendStatesCS: {fileID: 0}
64 | m_RendererFeatures:
65 | - {fileID: -1878332245247344467}
66 | m_RendererFeatureMap: adc0de57c6d2eee5
67 | m_UseNativeRenderPass: 0
68 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
69 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
70 | m_AssetVersion: 2
71 | m_OpaqueLayerMask:
72 | serializedVersion: 2
73 | m_Bits: 4294967295
74 | m_TransparentLayerMask:
75 | serializedVersion: 2
76 | m_Bits: 4294967295
77 | m_DefaultStencilState:
78 | overrideStencilState: 0
79 | stencilReference: 0
80 | stencilCompareFunction: 8
81 | passOperation: 2
82 | failOperation: 0
83 | zFailOperation: 0
84 | m_ShadowTransparentReceive: 1
85 | m_RenderingMode: 0
86 | m_DepthPrimingMode: 0
87 | m_CopyDepthMode: 0
88 | m_DepthAttachmentFormat: 0
89 | m_DepthTextureFormat: 0
90 | m_AccurateGbufferNormals: 0
91 | m_IntermediateTextureMode: 0
92 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-HighFidelity-Renderer.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c40be3174f62c4acf8c1216858c64956
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-HighFidelity.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
13 | m_Name: URP-HighFidelity
14 | m_EditorClassIdentifier:
15 | k_AssetVersion: 12
16 | k_AssetPreviousVersion: 12
17 | m_RendererType: 1
18 | m_RendererData: {fileID: 0}
19 | m_RendererDataList:
20 | - {fileID: 11400000, guid: c40be3174f62c4acf8c1216858c64956, type: 2}
21 | m_DefaultRendererIndex: 0
22 | m_RequireDepthTexture: 0
23 | m_RequireOpaqueTexture: 0
24 | m_OpaqueDownsampling: 1
25 | m_SupportsTerrainHoles: 1
26 | m_SupportsHDR: 1
27 | m_HDRColorBufferPrecision: 0
28 | m_MSAA: 4
29 | m_RenderScale: 1
30 | m_UpscalingFilter: 0
31 | m_FsrOverrideSharpness: 0
32 | m_FsrSharpness: 0.92
33 | m_EnableLODCrossFade: 1
34 | m_LODCrossFadeDitheringType: 1
35 | m_ShEvalMode: 0
36 | m_LightProbeSystem: 0
37 | m_ProbeVolumeMemoryBudget: 1024
38 | m_ProbeVolumeBlendingMemoryBudget: 256
39 | m_SupportProbeVolumeGPUStreaming: 0
40 | m_SupportProbeVolumeDiskStreaming: 0
41 | m_SupportProbeVolumeScenarios: 0
42 | m_SupportProbeVolumeScenarioBlending: 0
43 | m_ProbeVolumeSHBands: 1
44 | m_MainLightRenderingMode: 1
45 | m_MainLightShadowsSupported: 1
46 | m_MainLightShadowmapResolution: 4096
47 | m_AdditionalLightsRenderingMode: 1
48 | m_AdditionalLightsPerObjectLimit: 8
49 | m_AdditionalLightShadowsSupported: 1
50 | m_AdditionalLightsShadowmapResolution: 4096
51 | m_AdditionalLightsShadowResolutionTierLow: 128
52 | m_AdditionalLightsShadowResolutionTierMedium: 256
53 | m_AdditionalLightsShadowResolutionTierHigh: 512
54 | m_ReflectionProbeBlending: 1
55 | m_ReflectionProbeBoxProjection: 1
56 | m_ShadowDistance: 150
57 | m_ShadowCascadeCount: 4
58 | m_Cascade2Split: 0.25
59 | m_Cascade3Split: {x: 0.1, y: 0.3}
60 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
61 | m_CascadeBorder: 0.1
62 | m_ShadowDepthBias: 1
63 | m_ShadowNormalBias: 1
64 | m_AnyShadowsSupported: 1
65 | m_SoftShadowsSupported: 1
66 | m_ConservativeEnclosingSphere: 0
67 | m_NumIterationsEnclosingSphere: 64
68 | m_SoftShadowQuality: 2
69 | m_AdditionalLightsCookieResolution: 4096
70 | m_AdditionalLightsCookieFormat: 4
71 | m_UseSRPBatcher: 1
72 | m_SupportsDynamicBatching: 0
73 | m_MixedLightingSupported: 1
74 | m_SupportsLightCookies: 1
75 | m_SupportsLightLayers: 0
76 | m_DebugLevel: 0
77 | m_StoreActionsOptimization: 0
78 | m_UseAdaptivePerformance: 1
79 | m_ColorGradingMode: 0
80 | m_ColorGradingLutSize: 32
81 | m_AllowPostProcessAlphaOutput: 0
82 | m_UseFastSRGBLinearConversion: 0
83 | m_SupportDataDrivenLensFlare: 1
84 | m_SupportScreenSpaceLensFlare: 1
85 | m_GPUResidentDrawerMode: 0
86 | m_SmallMeshScreenPercentage: 0
87 | m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0
88 | m_ShadowType: 1
89 | m_LocalShadowsSupported: 0
90 | m_LocalShadowsAtlasResolution: 256
91 | m_MaxPixelLights: 0
92 | m_ShadowAtlasResolution: 256
93 | m_VolumeFrameworkUpdateMode: 0
94 | m_VolumeProfile: {fileID: 0}
95 | apvScenesData:
96 | obsoleteSceneBounds:
97 | m_Keys: []
98 | m_Values: []
99 | obsoleteHasProbeVolumes:
100 | m_Keys: []
101 | m_Values:
102 | m_PrefilteringModeMainLightShadows: 1
103 | m_PrefilteringModeAdditionalLight: 4
104 | m_PrefilteringModeAdditionalLightShadows: 1
105 | m_PrefilterXRKeywords: 0
106 | m_PrefilteringModeForwardPlus: 1
107 | m_PrefilteringModeDeferredRendering: 1
108 | m_PrefilteringModeScreenSpaceOcclusion: 1
109 | m_PrefilterDebugKeywords: 0
110 | m_PrefilterWriteRenderingLayers: 0
111 | m_PrefilterHDROutput: 0
112 | m_PrefilterAlphaOutput: 0
113 | m_PrefilterSSAODepthNormals: 0
114 | m_PrefilterSSAOSourceDepthLow: 0
115 | m_PrefilterSSAOSourceDepthMedium: 0
116 | m_PrefilterSSAOSourceDepthHigh: 0
117 | m_PrefilterSSAOInterleaved: 0
118 | m_PrefilterSSAOBlueNoise: 0
119 | m_PrefilterSSAOSampleCountLow: 0
120 | m_PrefilterSSAOSampleCountMedium: 0
121 | m_PrefilterSSAOSampleCountHigh: 0
122 | m_PrefilterDBufferMRT1: 0
123 | m_PrefilterDBufferMRT2: 0
124 | m_PrefilterDBufferMRT3: 0
125 | m_PrefilterSoftShadowsQualityLow: 0
126 | m_PrefilterSoftShadowsQualityMedium: 0
127 | m_PrefilterSoftShadowsQualityHigh: 0
128 | m_PrefilterSoftShadows: 0
129 | m_PrefilterScreenCoord: 0
130 | m_PrefilterNativeRenderPass: 0
131 | m_PrefilterUseLegacyLightmaps: 0
132 | m_ShaderVariantLogLevel: 0
133 | m_ShadowCascades: 1
134 | m_Textures:
135 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
136 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
137 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-HighFidelity.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7b7fd9122c28c4d15b667c7040e3b3fd
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Performant-Renderer.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
13 | m_Name: URP-Performant-Renderer
14 | m_EditorClassIdentifier:
15 | debugShaders:
16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
17 | type: 3}
18 | m_RendererFeatures: []
19 | m_RendererFeatureMap:
20 | m_UseNativeRenderPass: 0
21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
22 | shaders:
23 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
24 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
25 | screenSpaceShadowPS: {fileID: 0}
26 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
27 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
28 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
29 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
30 | coreBlitPS: {fileID: 0}
31 | coreBlitColorAndDepthPS: {fileID: 0}
32 | cameraMotionVector: {fileID: 0}
33 | objectMotionVector: {fileID: 0}
34 | m_OpaqueLayerMask:
35 | serializedVersion: 2
36 | m_Bits: 4294967295
37 | m_TransparentLayerMask:
38 | serializedVersion: 2
39 | m_Bits: 4294967295
40 | m_DefaultStencilState:
41 | overrideStencilState: 0
42 | stencilReference: 0
43 | stencilCompareFunction: 8
44 | passOperation: 2
45 | failOperation: 0
46 | zFailOperation: 0
47 | m_ShadowTransparentReceive: 1
48 | m_RenderingMode: 0
49 | m_DepthPrimingMode: 0
50 | m_AccurateGbufferNormals: 0
51 | m_ClusteredRendering: 0
52 | m_TileSize: 32
53 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Performant-Renderer.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 707360a9c581a4bd7aa53bfeb1429f71
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Performant.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
13 | m_Name: URP-Performant
14 | m_EditorClassIdentifier:
15 | k_AssetVersion: 12
16 | k_AssetPreviousVersion: 12
17 | m_RendererType: 1
18 | m_RendererData: {fileID: 0}
19 | m_RendererDataList:
20 | - {fileID: 11400000, guid: 707360a9c581a4bd7aa53bfeb1429f71, type: 2}
21 | m_DefaultRendererIndex: 0
22 | m_RequireDepthTexture: 0
23 | m_RequireOpaqueTexture: 0
24 | m_OpaqueDownsampling: 1
25 | m_SupportsTerrainHoles: 1
26 | m_SupportsHDR: 0
27 | m_HDRColorBufferPrecision: 0
28 | m_MSAA: 1
29 | m_RenderScale: 1
30 | m_UpscalingFilter: 0
31 | m_FsrOverrideSharpness: 0
32 | m_FsrSharpness: 0.92
33 | m_EnableLODCrossFade: 1
34 | m_LODCrossFadeDitheringType: 1
35 | m_ShEvalMode: 0
36 | m_LightProbeSystem: 0
37 | m_ProbeVolumeMemoryBudget: 1024
38 | m_ProbeVolumeBlendingMemoryBudget: 256
39 | m_SupportProbeVolumeGPUStreaming: 0
40 | m_SupportProbeVolumeDiskStreaming: 0
41 | m_SupportProbeVolumeScenarios: 0
42 | m_SupportProbeVolumeScenarioBlending: 0
43 | m_ProbeVolumeSHBands: 1
44 | m_MainLightRenderingMode: 1
45 | m_MainLightShadowsSupported: 0
46 | m_MainLightShadowmapResolution: 1024
47 | m_AdditionalLightsRenderingMode: 0
48 | m_AdditionalLightsPerObjectLimit: 4
49 | m_AdditionalLightShadowsSupported: 0
50 | m_AdditionalLightsShadowmapResolution: 512
51 | m_AdditionalLightsShadowResolutionTierLow: 128
52 | m_AdditionalLightsShadowResolutionTierMedium: 256
53 | m_AdditionalLightsShadowResolutionTierHigh: 512
54 | m_ReflectionProbeBlending: 0
55 | m_ReflectionProbeBoxProjection: 0
56 | m_ShadowDistance: 50
57 | m_ShadowCascadeCount: 1
58 | m_Cascade2Split: 0.25
59 | m_Cascade3Split: {x: 0.1, y: 0.3}
60 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
61 | m_CascadeBorder: 0.1
62 | m_ShadowDepthBias: 1
63 | m_ShadowNormalBias: 1
64 | m_AnyShadowsSupported: 1
65 | m_SoftShadowsSupported: 0
66 | m_ConservativeEnclosingSphere: 0
67 | m_NumIterationsEnclosingSphere: 64
68 | m_SoftShadowQuality: 2
69 | m_AdditionalLightsCookieResolution: 2048
70 | m_AdditionalLightsCookieFormat: 3
71 | m_UseSRPBatcher: 1
72 | m_SupportsDynamicBatching: 0
73 | m_MixedLightingSupported: 1
74 | m_SupportsLightCookies: 1
75 | m_SupportsLightLayers: 0
76 | m_DebugLevel: 0
77 | m_StoreActionsOptimization: 0
78 | m_UseAdaptivePerformance: 1
79 | m_ColorGradingMode: 0
80 | m_ColorGradingLutSize: 16
81 | m_AllowPostProcessAlphaOutput: 0
82 | m_UseFastSRGBLinearConversion: 0
83 | m_SupportDataDrivenLensFlare: 1
84 | m_SupportScreenSpaceLensFlare: 1
85 | m_GPUResidentDrawerMode: 0
86 | m_SmallMeshScreenPercentage: 0
87 | m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0
88 | m_ShadowType: 1
89 | m_LocalShadowsSupported: 0
90 | m_LocalShadowsAtlasResolution: 256
91 | m_MaxPixelLights: 0
92 | m_ShadowAtlasResolution: 256
93 | m_VolumeFrameworkUpdateMode: 0
94 | m_VolumeProfile: {fileID: 0}
95 | apvScenesData:
96 | obsoleteSceneBounds:
97 | m_Keys: []
98 | m_Values: []
99 | obsoleteHasProbeVolumes:
100 | m_Keys: []
101 | m_Values:
102 | m_PrefilteringModeMainLightShadows: 1
103 | m_PrefilteringModeAdditionalLight: 4
104 | m_PrefilteringModeAdditionalLightShadows: 1
105 | m_PrefilterXRKeywords: 0
106 | m_PrefilteringModeForwardPlus: 1
107 | m_PrefilteringModeDeferredRendering: 1
108 | m_PrefilteringModeScreenSpaceOcclusion: 1
109 | m_PrefilterDebugKeywords: 0
110 | m_PrefilterWriteRenderingLayers: 0
111 | m_PrefilterHDROutput: 0
112 | m_PrefilterAlphaOutput: 0
113 | m_PrefilterSSAODepthNormals: 0
114 | m_PrefilterSSAOSourceDepthLow: 0
115 | m_PrefilterSSAOSourceDepthMedium: 0
116 | m_PrefilterSSAOSourceDepthHigh: 0
117 | m_PrefilterSSAOInterleaved: 0
118 | m_PrefilterSSAOBlueNoise: 0
119 | m_PrefilterSSAOSampleCountLow: 0
120 | m_PrefilterSSAOSampleCountMedium: 0
121 | m_PrefilterSSAOSampleCountHigh: 0
122 | m_PrefilterDBufferMRT1: 0
123 | m_PrefilterDBufferMRT2: 0
124 | m_PrefilterDBufferMRT3: 0
125 | m_PrefilterSoftShadowsQualityLow: 0
126 | m_PrefilterSoftShadowsQualityMedium: 0
127 | m_PrefilterSoftShadowsQualityHigh: 0
128 | m_PrefilterSoftShadows: 0
129 | m_PrefilterScreenCoord: 0
130 | m_PrefilterNativeRenderPass: 0
131 | m_PrefilterUseLegacyLightmaps: 0
132 | m_ShaderVariantLogLevel: 0
133 | m_ShadowCascades: 0
134 | m_Textures:
135 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
136 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
137 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/URP-Performant.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d0e2fc18fe036412f8223b3b3d9ad574
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 18dc0cd2c080841dea60987a38ce93fa
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/minimalproject/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.jlpm.motionmatching": "file:../../com.jlpm.motionmatching",
4 | "com.unity.ide.visualstudio": "2.0.22",
5 | "com.unity.inputsystem": "1.13.0",
6 | "com.unity.render-pipelines.universal": "17.0.3",
7 | "com.unity.modules.accessibility": "1.0.0",
8 | "com.unity.modules.ai": "1.0.0",
9 | "com.unity.modules.androidjni": "1.0.0",
10 | "com.unity.modules.animation": "1.0.0",
11 | "com.unity.modules.assetbundle": "1.0.0",
12 | "com.unity.modules.audio": "1.0.0",
13 | "com.unity.modules.cloth": "1.0.0",
14 | "com.unity.modules.director": "1.0.0",
15 | "com.unity.modules.imageconversion": "1.0.0",
16 | "com.unity.modules.imgui": "1.0.0",
17 | "com.unity.modules.jsonserialize": "1.0.0",
18 | "com.unity.modules.particlesystem": "1.0.0",
19 | "com.unity.modules.physics": "1.0.0",
20 | "com.unity.modules.physics2d": "1.0.0",
21 | "com.unity.modules.screencapture": "1.0.0",
22 | "com.unity.modules.terrain": "1.0.0",
23 | "com.unity.modules.terrainphysics": "1.0.0",
24 | "com.unity.modules.tilemap": "1.0.0",
25 | "com.unity.modules.ui": "1.0.0",
26 | "com.unity.modules.uielements": "1.0.0",
27 | "com.unity.modules.umbra": "1.0.0",
28 | "com.unity.modules.unityanalytics": "1.0.0",
29 | "com.unity.modules.unitywebrequest": "1.0.0",
30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
31 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
32 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
33 | "com.unity.modules.unitywebrequestwww": "1.0.0",
34 | "com.unity.modules.vehicles": "1.0.0",
35 | "com.unity.modules.video": "1.0.0",
36 | "com.unity.modules.vr": "1.0.0",
37 | "com.unity.modules.wind": "1.0.0",
38 | "com.unity.modules.xr": "1.0.0"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 0
20 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/BurstAotSettings_StandaloneWindows.json:
--------------------------------------------------------------------------------
1 | {
2 | "MonoBehaviour": {
3 | "Version": 4,
4 | "EnableBurstCompilation": true,
5 | "EnableOptimisations": true,
6 | "EnableSafetyChecks": false,
7 | "EnableDebugInAllBuilds": false,
8 | "UsePlatformSDKLinker": false,
9 | "CpuMinTargetX32": 0,
10 | "CpuMaxTargetX32": 0,
11 | "CpuMinTargetX64": 0,
12 | "CpuMaxTargetX64": 0,
13 | "CpuTargetsX32": 6,
14 | "CpuTargetsX64": 72,
15 | "OptimizeFor": 0
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/CommonBurstAotSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "MonoBehaviour": {
3 | "Version": 4,
4 | "DisabledWarnings": ""
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 13
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0.1
18 | m_ClothInterCollisionStiffness: 0.2
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 0
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ClothGravity: {x: 0, y: -9.81, z: 0}
26 | m_ContactPairsMode: 0
27 | m_BroadphaseType: 0
28 | m_WorldBounds:
29 | m_Center: {x: 0, y: 0, z: 0}
30 | m_Extent: {x: 250, y: 250, z: 250}
31 | m_WorldSubdivisions: 8
32 | m_FrictionType: 0
33 | m_EnableEnhancedDeterminism: 0
34 | m_EnableUnifiedHeightmaps: 1
35 | m_SolverType: 0
36 | m_DefaultMaxAngularSpeed: 50
37 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 0
9 | path:
10 | guid: 00000000000000000000000000000000
11 | - enabled: 0
12 | path:
13 | guid: 00000000000000000000000000000000
14 | - enabled: 1
15 | path: Assets/New Scene.unity
16 | guid: f6a5a73ddca4b0942a8c45eafaf50586
17 | m_configObjects: {}
18 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 9
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_EnterPlayModeOptionsEnabled: 0
27 | m_EnterPlayModeOptions: 3
28 | m_ShowLightmapResolutionOverlay: 1
29 | m_UseLegacyProbeSampleCount: 0
30 | m_AssetPipelineMode: 1
31 | m_CacheServerMode: 0
32 | m_CacheServerEndpoint:
33 | m_CacheServerNamespacePrefix: default
34 | m_CacheServerEnableDownload: 1
35 | m_CacheServerEnableUpload: 1
36 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 16
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_DepthNormals:
17 | m_Mode: 1
18 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
19 | m_MotionVectors:
20 | m_Mode: 1
21 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
22 | m_LightHalo:
23 | m_Mode: 1
24 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LensFlare:
26 | m_Mode: 1
27 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
28 | m_VideoShadersIncludeMode: 2
29 | m_AlwaysIncludedShaders:
30 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
31 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
32 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
37 | m_PreloadedShaders: []
38 | m_PreloadShadersBatchTimeLimit: -1
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
40 | type: 0}
41 | m_CustomRenderPipeline: {fileID: 11400000, guid: 7b7fd9122c28c4d15b667c7040e3b3fd,
42 | type: 2}
43 | m_TransparencySortMode: 0
44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
45 | m_DefaultRenderingPath: 1
46 | m_DefaultMobileRenderingPath: 1
47 | m_TierSettings: []
48 | m_LightmapStripping: 0
49 | m_FogStripping: 0
50 | m_InstancingStripping: 0
51 | m_BrgStripping: 0
52 | m_LightmapKeepPlain: 1
53 | m_LightmapKeepDirCombined: 1
54 | m_LightmapKeepDynamicPlain: 1
55 | m_LightmapKeepDynamicDirCombined: 1
56 | m_LightmapKeepShadowMask: 1
57 | m_LightmapKeepSubtractive: 1
58 | m_FogKeepLinear: 1
59 | m_FogKeepExp: 1
60 | m_FogKeepExp2: 1
61 | m_AlbedoSwatchInfos: []
62 | m_RenderPipelineGlobalSettingsMap:
63 | UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 18dc0cd2c080841dea60987a38ce93fa,
64 | type: 2}
65 | m_LightsUseLinearIntensity: 1
66 | m_LightsUseColorTemperature: 1
67 | m_LogWhenShaderIsCompiled: 0
68 | m_LightProbeOutsideHullStrategy: 0
69 | m_CameraRelativeLightCulling: 0
70 | m_CameraRelativeShadowCulling: 0
71 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/MemorySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!387306366 &1
4 | MemorySettings:
5 | m_ObjectHideFlags: 0
6 | m_EditorMemorySettings:
7 | m_MainAllocatorBlockSize: -1
8 | m_ThreadAllocatorBlockSize: -1
9 | m_MainGfxBlockSize: -1
10 | m_ThreadGfxBlockSize: -1
11 | m_CacheBlockSize: -1
12 | m_TypetreeBlockSize: -1
13 | m_ProfilerBlockSize: -1
14 | m_ProfilerEditorBlockSize: -1
15 | m_BucketAllocatorGranularity: -1
16 | m_BucketAllocatorBucketsCount: -1
17 | m_BucketAllocatorBlockSize: -1
18 | m_BucketAllocatorBlockCount: -1
19 | m_ProfilerBucketAllocatorGranularity: -1
20 | m_ProfilerBucketAllocatorBucketsCount: -1
21 | m_ProfilerBucketAllocatorBlockSize: -1
22 | m_ProfilerBucketAllocatorBlockCount: -1
23 | m_TempAllocatorSizeMain: -1
24 | m_JobTempAllocatorBlockSize: -1
25 | m_BackgroundJobTempAllocatorBlockSize: -1
26 | m_JobTempAllocatorReducedBlockSize: -1
27 | m_TempAllocatorSizeGIBakingWorker: -1
28 | m_TempAllocatorSizeNavMeshWorker: -1
29 | m_TempAllocatorSizeAudioWorker: -1
30 | m_TempAllocatorSizeCloudWorker: -1
31 | m_TempAllocatorSizeGfx: -1
32 | m_TempAllocatorSizeJobWorker: -1
33 | m_TempAllocatorSizeBackgroundWorker: -1
34 | m_TempAllocatorSizePreloadManager: -1
35 | m_PlatformMemorySettings: {}
36 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/MultiplayerManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!655991488 &1
4 | MultiplayerManager:
5 | m_ObjectHideFlags: 0
6 | m_EnableMultiplayerRoles: 0
7 | m_StrippingTypes: {}
8 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_EnablePreReleasePackages: 0
16 | m_EnablePackageDependencies: 0
17 | m_AdvancedSettingsExpanded: 1
18 | m_ScopedRegistriesSettingsExpanded: 1
19 | m_SeeAllPackageVersions: 0
20 | oneTimeWarningShown: 1
21 | m_Registries:
22 | - m_Id: main
23 | m_Name:
24 | m_Url: https://packages.unity.com
25 | m_Scopes: []
26 | m_IsDefault: 1
27 | m_Capabilities: 7
28 | m_UserSelectedRegistryName:
29 | m_UserAddingNewScopedRegistry: 0
30 | m_RegistryInfoDraft:
31 | m_Modified: 0
32 | m_ErrorMessage:
33 | m_UserModificationsInstanceId: -824
34 | m_OriginalInstanceId: -826
35 | m_LoadAssets: 0
36 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 0
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_DefaultPresets: {}
8 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 6000.0.38f1
2 | m_EditorVersionWithRevision: 6000.0.38f1 (82314a941f2d)
3 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 2
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Performant
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 20
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | skinWeights: 2
22 | textureQuality: 0
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.4
31 | maximumLODLevel: 0
32 | streamingMipmapsActive: 0
33 | streamingMipmapsAddAllCameras: 1
34 | streamingMipmapsMemoryBudget: 512
35 | streamingMipmapsRenderersPerFrame: 512
36 | streamingMipmapsMaxLevelReduction: 2
37 | streamingMipmapsMaxFileIORequests: 1024
38 | particleRaycastBudget: 4
39 | asyncUploadTimeSlice: 2
40 | asyncUploadBufferSize: 16
41 | asyncUploadPersistentBuffer: 1
42 | resolutionScalingFixedDPIFactor: 1
43 | customRenderPipeline: {fileID: 11400000, guid: d0e2fc18fe036412f8223b3b3d9ad574,
44 | type: 2}
45 | excludedTargetPlatforms: []
46 | - serializedVersion: 2
47 | name: Balanced
48 | pixelLightCount: 1
49 | shadows: 1
50 | shadowResolution: 0
51 | shadowProjection: 1
52 | shadowCascades: 1
53 | shadowDistance: 20
54 | shadowNearPlaneOffset: 3
55 | shadowCascade2Split: 0.33333334
56 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
57 | shadowmaskMode: 0
58 | skinWeights: 4
59 | textureQuality: 0
60 | anisotropicTextures: 1
61 | antiAliasing: 0
62 | softParticles: 0
63 | softVegetation: 0
64 | realtimeReflectionProbes: 0
65 | billboardsFaceCameraPosition: 0
66 | vSyncCount: 0
67 | lodBias: 1
68 | maximumLODLevel: 0
69 | streamingMipmapsActive: 0
70 | streamingMipmapsAddAllCameras: 1
71 | streamingMipmapsMemoryBudget: 512
72 | streamingMipmapsRenderersPerFrame: 512
73 | streamingMipmapsMaxLevelReduction: 2
74 | streamingMipmapsMaxFileIORequests: 1024
75 | particleRaycastBudget: 64
76 | asyncUploadTimeSlice: 2
77 | asyncUploadBufferSize: 16
78 | asyncUploadPersistentBuffer: 1
79 | resolutionScalingFixedDPIFactor: 1
80 | customRenderPipeline: {fileID: 11400000, guid: e1260c1148f6143b28bae5ace5e9c5d1,
81 | type: 2}
82 | excludedTargetPlatforms: []
83 | - serializedVersion: 2
84 | name: High Fidelity
85 | pixelLightCount: 2
86 | shadows: 2
87 | shadowResolution: 1
88 | shadowProjection: 1
89 | shadowCascades: 2
90 | shadowDistance: 40
91 | shadowNearPlaneOffset: 3
92 | shadowCascade2Split: 0.33333334
93 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
94 | shadowmaskMode: 1
95 | skinWeights: 255
96 | textureQuality: 0
97 | anisotropicTextures: 2
98 | antiAliasing: 4
99 | softParticles: 0
100 | softVegetation: 1
101 | realtimeReflectionProbes: 1
102 | billboardsFaceCameraPosition: 1
103 | vSyncCount: 0
104 | lodBias: 2
105 | maximumLODLevel: 0
106 | streamingMipmapsActive: 0
107 | streamingMipmapsAddAllCameras: 1
108 | streamingMipmapsMemoryBudget: 512
109 | streamingMipmapsRenderersPerFrame: 512
110 | streamingMipmapsMaxLevelReduction: 2
111 | streamingMipmapsMaxFileIORequests: 1024
112 | particleRaycastBudget: 2048
113 | asyncUploadTimeSlice: 2
114 | asyncUploadBufferSize: 16
115 | asyncUploadPersistentBuffer: 1
116 | resolutionScalingFixedDPIFactor: 1
117 | customRenderPipeline: {fileID: 11400000, guid: 7b7fd9122c28c4d15b667c7040e3b3fd,
118 | type: 2}
119 | excludedTargetPlatforms: []
120 | m_PerPlatformDefaultQuality:
121 | Android: 1
122 | CloudRendering: 2
123 | Lumin: 2
124 | Nintendo Switch: 2
125 | PS4: 2
126 | Server: 0
127 | Stadia: 2
128 | Standalone: 2
129 | WebGL: 1
130 | Windows Store Apps: 2
131 | XboxOne: 2
132 | iPhone: 1
133 | tvOS: 1
134 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/SceneTemplateSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "templatePinStates": [],
3 | "dependencyTypeInfos": [
4 | {
5 | "userAdded": false,
6 | "type": "UnityEngine.AnimationClip",
7 | "defaultInstantiationMode": 0
8 | },
9 | {
10 | "userAdded": false,
11 | "type": "UnityEditor.Animations.AnimatorController",
12 | "defaultInstantiationMode": 0
13 | },
14 | {
15 | "userAdded": false,
16 | "type": "UnityEngine.AnimatorOverrideController",
17 | "defaultInstantiationMode": 0
18 | },
19 | {
20 | "userAdded": false,
21 | "type": "UnityEditor.Audio.AudioMixerController",
22 | "defaultInstantiationMode": 0
23 | },
24 | {
25 | "userAdded": false,
26 | "type": "UnityEngine.ComputeShader",
27 | "defaultInstantiationMode": 1
28 | },
29 | {
30 | "userAdded": false,
31 | "type": "UnityEngine.Cubemap",
32 | "defaultInstantiationMode": 0
33 | },
34 | {
35 | "userAdded": false,
36 | "type": "UnityEngine.GameObject",
37 | "defaultInstantiationMode": 0
38 | },
39 | {
40 | "userAdded": false,
41 | "type": "UnityEditor.LightingDataAsset",
42 | "defaultInstantiationMode": 0
43 | },
44 | {
45 | "userAdded": false,
46 | "type": "UnityEngine.LightingSettings",
47 | "defaultInstantiationMode": 0
48 | },
49 | {
50 | "userAdded": false,
51 | "type": "UnityEngine.Material",
52 | "defaultInstantiationMode": 0
53 | },
54 | {
55 | "userAdded": false,
56 | "type": "UnityEditor.MonoScript",
57 | "defaultInstantiationMode": 1
58 | },
59 | {
60 | "userAdded": false,
61 | "type": "UnityEngine.PhysicMaterial",
62 | "defaultInstantiationMode": 0
63 | },
64 | {
65 | "userAdded": false,
66 | "type": "UnityEngine.PhysicsMaterial",
67 | "defaultInstantiationMode": 0
68 | },
69 | {
70 | "userAdded": false,
71 | "type": "UnityEngine.PhysicsMaterial2D",
72 | "defaultInstantiationMode": 0
73 | },
74 | {
75 | "userAdded": false,
76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
77 | "defaultInstantiationMode": 0
78 | },
79 | {
80 | "userAdded": false,
81 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
82 | "defaultInstantiationMode": 0
83 | },
84 | {
85 | "userAdded": false,
86 | "type": "UnityEngine.Rendering.VolumeProfile",
87 | "defaultInstantiationMode": 0
88 | },
89 | {
90 | "userAdded": false,
91 | "type": "UnityEditor.SceneAsset",
92 | "defaultInstantiationMode": 0
93 | },
94 | {
95 | "userAdded": false,
96 | "type": "UnityEngine.Shader",
97 | "defaultInstantiationMode": 1
98 | },
99 | {
100 | "userAdded": false,
101 | "type": "UnityEngine.ShaderVariantCollection",
102 | "defaultInstantiationMode": 1
103 | },
104 | {
105 | "userAdded": false,
106 | "type": "UnityEngine.Texture",
107 | "defaultInstantiationMode": 0
108 | },
109 | {
110 | "userAdded": false,
111 | "type": "UnityEngine.Texture2D",
112 | "defaultInstantiationMode": 0
113 | },
114 | {
115 | "userAdded": false,
116 | "type": "UnityEngine.Timeline.TimelineAsset",
117 | "defaultInstantiationMode": 0
118 | }
119 | ],
120 | "defaultDependencyTypeInfo": {
121 | "userAdded": false,
122 | "type": "",
123 | "defaultInstantiationMode": 1
124 | },
125 | "newSceneOverride": 0
126 | }
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/ShaderGraphSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | shaderVariantLimit: 2048
16 | customInterpolatorErrorThreshold: 32
17 | customInterpolatorWarningThreshold: 16
18 | customHeatmapValues: {fileID: 0}
19 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 3
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 | m_RenderingLayers:
45 | - Default
46 | - Light Layer 1
47 | - Light Layer 2
48 | - Light Layer 3
49 | - Light Layer 4
50 | - Light Layer 5
51 | - Light Layer 6
52 | - Light Layer 7
53 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/TimelineSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | assetDefaultFramerate: 60
16 | m_DefaultFrameRate: 60
17 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/URPProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_LastMaterialVersion: 9
16 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_DashboardUrl: https://dashboard.unity3d.com
13 | m_TestInitMode: 0
14 | CrashReportingSettings:
15 | m_EventUrl: https://perf-events.cloud.unity3d.com
16 | m_Enabled: 0
17 | m_LogBufferSize: 10
18 | m_CaptureEditorExceptions: 1
19 | UnityPurchasingSettings:
20 | m_Enabled: 0
21 | m_TestMode: 0
22 | UnityAnalyticsSettings:
23 | m_Enabled: 0
24 | m_TestMode: 0
25 | m_InitializeOnStartup: 1
26 | UnityAdsSettings:
27 | m_Enabled: 0
28 | m_InitializeOnStartup: 1
29 | m_TestMode: 0
30 | m_IosGameId:
31 | m_AndroidGameId:
32 | m_GameIds: {}
33 | m_GameId:
34 | PerformanceReportingSettings:
35 | m_Enabled: 0
36 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_StripUpdateShader: {fileID: 0}
10 | m_RenderPipeSettingsPath:
11 | m_FixedTimeStep: 0.016666668
12 | m_MaxDeltaTime: 0.05
13 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/VersionControlSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!890905787 &1
4 | VersionControlSettings:
5 | m_ObjectHideFlags: 0
6 | m_Mode: Visible Meta Files
7 | m_CollabEditorSettings:
8 | inProgressEnabled: 1
9 |
--------------------------------------------------------------------------------
/minimalproject/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------