Hi, I just testing Creature for our new 2d game. But i have one problem using with Animator in Unity. It doesn't change animation stage and stuck in animation stage set on CreatureRendener(scripts) --> Animation.
And I got this error,
"NullReferenceException: Object reference not set to an instance of an object
CreatureStateMachineBehavior.OnStateEnter (UnityEngine.Animator animator, AnimatorStateInfo stateInfo, Int32 layerIndex) (at Assets/Distro/CreatureStateMachineBehavior.cs:20)"
There are no other scripts in the unity project, just playing with demos and stuck in there Is there any thing i missed?
Unity Animator Problem
Re: Unity Animator Problem
Hello,
I just checked with a test case using MecAnim and it seems to be running fine.
The error seems to indicate that some reference to an object is null. What is null in this case?
If you run this in Visual Studio, what does the inspector say during debugging? Which variable/property is null?
I just checked with a test case using MecAnim and it seems to be running fine.
The error seems to indicate that some reference to an object is null. What is null in this case?
If you run this in Visual Studio, what does the inspector say during debugging? Which variable/property is null?
Re: Unity Animator Problem
Sry Chong, i miss placed the animator to creature renderer instead of creature game controller. Now everything is Ok and i delete my old testing projects and Nullreference error gone too . Just want to ask one question, How can i change the speed of the animation stage? I just tried with local time scale and all the of animation stage speed change. I want to change the speed of the animation stage individually.
Re: Unity Animator Problem
Hello,
There is no support in the Unity plugin UI yet, but you can modify the code to do this:
https://github.com/kestrelm/Creature_Un ... eModule.cs
Look at the function:
In it, it increments the animation runtime ( frame ) for each blended animation. You can easily adapt this to have a custom increment delta time based on your animation name.
There is no support in the Unity plugin UI yet, but you can modify the code to do this:
https://github.com/kestrelm/Creature_Un ... eModule.cs
Look at the function:
Code: Select all
private void IncreAutoBlendRunTimes(float delta_in)
In it, it increments the animation runtime ( frame ) for each blended animation. You can easily adapt this to have a custom increment delta time based on your animation name.