exdev / ex2d

Documentation, runtime scripts and others of ex2D
www.ex-dev.com/ex2d
43 stars 9 forks source link

Selecting a gameObject with a sprite/animation in the hierarchy navigator fixes broken animations #31

Closed greay closed 11 years ago

greay commented 12 years ago

I have a project where the player character's animations break when a new scene loads. I can't tell if I'm doing something wrong or if it's a bug; I haven't been able to track down the cause.

What is a sign of a bug, however, is that merely selecting the game object in the navigator after this occurs fixes the animations. This is consistently repeatable. Don't even need to touch anything in the inspector; bringing it up is all that's required.

jwu commented 12 years ago

Does this happen when your Game View is closed ?

greay commented 12 years ago

It doesn't matter if the game view is closed. It happens when it's open or closed. (I just verified that if I close it, select the object with the animation, and then unpause the game, it still "fixes" the issue)

steinbitglis commented 12 years ago

I'm guessing that the camera could not initialize on Awake (was not available), but will do so in OnInspectorGUI or OnEnable of the editor.