I just updated to Unity 5.3, and decided to update one of the games on my website to the new WebGL build. When I tested the game, some of the functionality didn’t execute. After a lot of debugging I narrowed it down to the functionality inside the StateMachineBehaviour scripts(its a 2D game).
for example: If I make a behaviour like this and attach it to an animation, then the object is destroyed while playing it as a standalone build or in the editor. But if I export it as a WebGL build the object isn’t destroyed after the animation has finished playing.
override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
Destroy(animator.gameObject);
}
Has anyone else experienced this, if so then I guess it needs to be reported as a bug.
EDIT: I have been in contact with the Unity bug report team, and I just recieved the following message:
Hey,
We have been able to reproduce this bug and have sent it for resolution with our developers.
We highly appreciate your contribution. If you have further questions, feel free to contact us.
Regards,
Stefan