Hi,
I have setup a reasonably complex statemachine. The states changes are mainly triggers emitted by code.
Is there a way to ‘play’ this state machine in the edit (along with animations) and trigger the transitions somehow? Or should I write a custom edit script that will do this for me?
Cheers
You can’t do it out of the box so you will need an editor script (though I’ve never tried doing it with an Animator Controller so I’m not even sure if it’s possible).
But it’s definitely possible if you use the Playables API (Animancer allows animations to be played in Edit Mode). One thing to be aware of is that it doesn’t work properly in Unity versions older than 2018.3 and I expect the same limitation would apply to Animator Controllers.
Animancer looks interesting, thanks for the headsup!
I ended up just creating an empty scene with only my character in it. Then setup key events in a script to trigger the different state machine parameters in game mode. Works OK. It would be nicer if unity supported state machine playback at edit time though.