Hey all :).
Wanted to point out something I found with building a game with Unity 5 using Mecanim that causes the build to crash Unity :(.
I believe that the problem is when you use the “Copy Current State Machine” action, for some reason it causes the editor to crash when trying to build the game.
I noticed this problem when I was tidying up some things to make it more compatible with different poses, I’m working on a 2D game and only using the state machine behaviour and blend trees. The editor crashed as soon as I tried to build the game to do some recording.
I did some tests and here’s what happened:
Problem
I first created an empty mecanim controller, just to make sure things are starting fresh.
I then went to an existing mecanim controller which had all my animations split up into 2 sub state machines
“InCombat” and “OutCombat”, and used the “Copy current SateMachine”.
I then pasted the sub state machine into my new mecanim controller and left everything as it was to check if the build will fail, and it did.
Then decided to try moving the inner states from the pasted sub state machine onto the base layer by simply selecting “InCombat”,“OutCombat”,“Death” and dragging them up to the “Base Layer”, the build still fails.
Solution Workaround
The only way I’ve noticed that the build will go through successfully is if I don’t use the action “Copy current StateMachine” and instead simply select the states that I want and choose “Copy”.
Then paste the states into the base layer and then hook everything up, the build actually goes through successfully, so I’ve found the work around, but wanted to bring this up in case anybody is running through the same issue or hasn’t even noticed.
If there is even a fix that would be really good as I can’t really use the “Copy current StateMachine” action.