Hi,
my problem is the following: I have a prefab with an animator controller attached to it.
In the editor, when the prefab is instantiated, it plays its default idle animation with no problem.
With the build, no animation is being played, and I absolutely don’t know why.
I prepared a very simple project in order to share it:
-
I created a prefab (called GameObject) with two child spheres in it. It has two animations, shot and idle (spheres moving left/right in idle, up/down in shot). To switch to shot, a trigger “shot” must be raised.
-
I created a script (Instantiate sphere) which instantiate this prefab, and trigger “shot” after 3 seconds.
- Play the scene in Unity editor: everything’s alright.
- Build the game after that: everything’s alright too.
- Close Unity, Open Unity, Build the game without running the scene before: no animation is being played on the prefab.
Attached, a zip with the project files. Just unzip and open in unity.
Note: I’ve reproduced it on different computers.
Note 2: Unity Pro, 4.5.2f1 (latest)
Thanks in advance, and please let me know if I’m doing something wrong!
1724614–108760–ReproAnimatorbug.zip (26.4 KB)