dreaw131313 / MotionMatchingByDreaw

Animation system for Unity engine based on motion matching
MIT License
263 stars 43 forks source link

Exception: In native motion group "Locomotion" animation data have diffrent sections count than setted Section Dependencies asset with name "SectionsDependencies"! #6

Closed strangeways-dev closed 5 months ago

strangeways-dev commented 5 months ago

Almost figured it out but I get this error in the console when pressing play

Exception: In native motion group "Locomotion" animation data have diffrent sections count than setted Section Dependencies asset with name "SectionsDependencies"!

MotionMatching.Gameplay.LogicState.CheckSectionDependenciesCOuntInData () (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Logic/LogicState.cs:610) MotionMatching.Gameplay.LogicState..ctor (MotionMatching.Gameplay.State_SO state, MotionMatching.Gameplay.MotionMatchingComponent component, MotionMatching.Gameplay.LogicMotionMatchingLayer logicLayer, MotionMatching.Gameplay.PlayableAnimationSystem animationSystem) (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Logic/LogicState.cs:101) MotionMatching.Gameplay.LogicMotionMatchingState..ctor (MotionMatching.Gameplay.MotionMatchingState_SO state, MotionMatching.Gameplay.MotionMatchingComponent component, MotionMatching.Gameplay.LogicMotionMatchingLayer logicLayer, MotionMatching.Gameplay.PlayableAnimationSystem animationSystem) (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Logic/LogicMotionMatchingState.cs:39) MotionMatching.Gameplay.MotionMatchingState_SO.CreateLogicState (MotionMatching.Gameplay.MotionMatchingComponent motionMatching, MotionMatching.Gameplay.LogicMotionMatchingLayer logicLayer, MotionMatching.Gameplay.PlayableAnimationSystem animationSystem) (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Data/MotionMatchingState_SO.cs:17) MotionMatching.Gameplay.MotionMatchingComponent.InitializeLogicGraph (UnityEngine.Transform gameObjectTransform) (at Assets/Motion Matching/Gameplay/Components/MotionMatchingComponent.cs:3597) MotionMatching.Gameplay.MotionMatchingComponent.Awake () (at Assets/Motion Matching/Gameplay/Components/MotionMatchingComponent.cs:266)

I will share a sample scene with the community when I get it working, any help would be appreciated

strangeways-dev commented 5 months ago

I fixed it by deleting the SectionsDependencies, creating a new one and I named it something else, I don't think it liked it being called SectionsDependencies because there is already a script called SectionsDependencies, either that or I messed something up while I was tinkering with it.

The error is gone, now I have a new problem, I am seeing trajectories but the character is not playing any animations. Will make a new issue soon if I can't resolve it.

dreaw131313 commented 5 months ago

About SectionDependecies (SD) - this is asset in which you create names of section for NativeMotionGroup(NMG). You always need set SD asset to NMG asset couse then system will not know which section NMG have. If you set it then you need click button to create section in AnimationData asset. Maybe character has wrong rig, or you have AnimatorController in Animator component.

dreaw131313 commented 5 months ago

I am a little tired of this asset and now I am quit developing it. Especialy that now Unreal engine will have free Motion Matching system. Create one issue and now I will try answer you all questions there @strangeways-dev

VicPrzz00 commented 5 months ago

i believe since you're getting tired of it, its best for everyone to just include 1 ready sample scene so everyone can see how its set up at least

ItsSaswata commented 1 month ago

Almost figured it out but I get this error in the console when pressing play

Exception: In native motion group "Locomotion" animation data have diffrent sections count than setted Section Dependencies asset with name "SectionsDependencies"!

MotionMatching.Gameplay.LogicState.CheckSectionDependenciesCOuntInData () (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Logic/LogicState.cs:610) MotionMatching.Gameplay.LogicState..ctor (MotionMatching.Gameplay.State_SO state, MotionMatching.Gameplay.MotionMatchingComponent component, MotionMatching.Gameplay.LogicMotionMatchingLayer logicLayer, MotionMatching.Gameplay.PlayableAnimationSystem animationSystem) (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Logic/LogicState.cs:101) MotionMatching.Gameplay.LogicMotionMatchingState..ctor (MotionMatching.Gameplay.MotionMatchingState_SO state, MotionMatching.Gameplay.MotionMatchingComponent component, MotionMatching.Gameplay.LogicMotionMatchingLayer logicLayer, MotionMatching.Gameplay.PlayableAnimationSystem animationSystem) (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Logic/LogicMotionMatchingState.cs:39) MotionMatching.Gameplay.MotionMatchingState_SO.CreateLogicState (MotionMatching.Gameplay.MotionMatchingComponent motionMatching, MotionMatching.Gameplay.LogicMotionMatchingLayer logicLayer, MotionMatching.Gameplay.PlayableAnimationSystem animationSystem) (at Assets/Motion Matching/Gameplay/MotionMatchingAnimatorController/Data/MotionMatchingState_SO.cs:17) MotionMatching.Gameplay.MotionMatchingComponent.InitializeLogicGraph (UnityEngine.Transform gameObjectTransform) (at Assets/Motion Matching/Gameplay/Components/MotionMatchingComponent.cs:3597) MotionMatching.Gameplay.MotionMatchingComponent.Awake () (at Assets/Motion Matching/Gameplay/Components/MotionMatchingComponent.cs:266)

I will share a sample scene with the community when I get it working, any help would be appreciated

Like can you please tell how to implement this in my scene I have no idea

dreaw131313 commented 1 month ago

@ItsSaswata When you have NativeMotionGroup (NMG) asset, and you placed animation data in it, you need also place SectionDependecies asset in this group, and click button "Generate Section dependecies", because now NMG do not know what sections animation data have