Trouble with Accessing 4.3's Animator.GoToState()

In the release notes its states a new function was added to the animator called GoToState.
I could not find one iota of information on it other that what is stated in the release notes. I couldn’t find any references in the scrip reference either. The editor says method named GoToState does not exist in the animator class.

Indeed , it's missing in Scripting Reference even at the webpage.

3 Answers

3

maybe, it has changed to Animator.SetTrigger ?

SetTrigger functions on an object that it is placed upon (ae: accessing an animation on an object that is placed upon), but when cross referencing another object, it throws a NullReferenceException error. Working on now. Will post when answered.

Looks like it’s CrossFade and Play, which are not yet usefully documented.

http://docs.unity3d.com/Documentation/ScriptReference/Animator.CrossFade.html
http://docs.unity3d.com/Documentation/ScriptReference/Animator.Play.html

It would seem in reference to the Play function in conjunction with the animator object that play is an unaccepted value. SetTrigger is what is being looked for, but in some (and sadly ill defined here, even by I) cases, SetTrigger refuses to function.

.Play worked for me also.
dammit. im searching why SetTrigger doesn’t work the whole day
Also it was in all their videos. and there’s no documentation. It seems this 2d update is still a bit raw.