Topic: Stance change error

I'm getting an error when I try to change stances

"Can't remove Animator because MecanimControl (Script) depends on it"

Anyone know why this would happen? I've tried duplicating the first stance, so all the required basic moves are there. I also tested it on a new, non-duplicated stance, and still get the same behavior.

Share

Thumbs up Thumbs down

Re: Stance change error

I notice when I try to change stances using the Stance changes in the Move Editor, I get the same result.

Share

Thumbs up Thumbs down

Re: Stance change error

Sorry to bump a post, but I haven't fixed this on my own yet.

Share

Thumbs up Thumbs down

Re: Stance change error

I'll look into it.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.
Don't forget to check our discord channel.

5 (edited by roswell108 2015-04-18 23:19:23)

Re: Stance change error

Steviebops wrote:

Sorry to bump a post, but I haven't fixed this on my own yet.

Go into the MecanimControl.cs and comment the line [RequireComponent (typeof (Animator))]

Just make sure there is always an animator because you are no longer verifying it automagically.

Share

Thumbs up Thumbs down

6 (edited by Steviebops 2015-04-20 17:08:13)

Re: Stance change error

Commenting out the line doesn't seem to solve it, the character disappears.

gives these errors:
"Quaternion To Matrix conversion failed because input Quaternion is invalid {1.#QNAN0, 1.#QNAN0, 1.#QNAN0, 1.#QNAN0} l=1.#QNAN0"

"IsFinite(outDistanceForSort)
UnityEditor.DockArea:OnGUI()"

"transform.position assign attempt for 'AnnaUFE(Clone)' is not valid. Input position is { NaN, NaN, NaN }."

Share

Thumbs up Thumbs down

Re: Stance change error

Steviebops wrote:

Commenting out the line doesn't seem to solve it, the character disappears.

gives these errors:
"Quaternion To Matrix conversion failed because input Quaternion is invalid {1.#QNAN0, 1.#QNAN0, 1.#QNAN0, 1.#QNAN0} l=1.#QNAN0"

"IsFinite(outDistanceForSort)
UnityEditor.DockArea:OnGUI()"

"transform.position assign attempt for 'AnnaUFE(Clone)' is not valid. Input position is { NaN, NaN, NaN }."

Sounds like something is definitely trying to delete it, not replace it at the "wrong time" then.

Share

Thumbs up Thumbs down

Re: Stance change error

Hello Guys, I'm new to UFE but have found my way around the codes. I'd like to know if this issue has been corrected because I'm having the same problem with both mecanim(animator dependency) and legacy(animation dependency) characters and I have no idea on how to fix this. I'm using UFE 1.6 and unity 5.1.3 on a for fun coding project. I've got this version from a friend with a big project that he doesn't want to updgrade. Any help is appreciated.

Share

Thumbs up Thumbs down

Re: Stance change error

I dont know if anyone will see this but I have solved this problem adding:

DestroyImmediate(gameObject.GetComponent(typeof(LegacyControl)));
DestroyImmediate(gameObject.GetComponent(typeof(MecanimControl)));

in FillMoves() as the first thing in the function, right before:

DestroyImmediate(gameObject.GetComponent(typeof(Animation)));
DestroyImmediate(gameObject.GetComponent(typeof(Animator)));
DestroyImmediate(gameObject.GetComponent("MecanimControl"));

Share

Thumbs up +1 Thumbs down