- Home /
Prefab animations grey'd out
I swear to god, hand to heart, I've tried everything I can think of with this. Googled everything, read every post I could find. No dice. That said, this is almost certainly the noobiest question ever, and for that, I'm sorry.
I'm trying to edit animations on a prefab, but the animations are greyed out. My programmer set them up. I'm almost positive he set them up in Unity, not Maya (because he hates Maya). I can't edit them, and I don't know why. The objects are spawned at runtime, so there are no in-scene objects that I can change animations on. I've tried duplicating the prefabs...but the animations on the duplicated prefabs are also un-editable.
Please let me know if I can give you more information. My programmer is unreachable for the next few days, and I'm getting pretty desperate.
Thanks in advance,
Kim
Did you try putting the prefab into the scene before editing the animations?
Answer by hvilela · Sep 27, 2012 at 01:47 PM
Create an instance of your prefab (drag it to the hierarchy or scene panel), select the instance, edit the animation than drag the instance (from the hierarchy) to the prefab (in the project panel).
Right, or just press the "apply" button on the instance in the inspector ;) You can't edit animations on prefabs because they do not "physically" exist in the scene.
Thank you Bunny83! I had an instance of the prefab in the Hierarchy, but it was not letting me edit the animation until I clicked "apply". You are a life saver!
Answer by Bunny83 · Sep 27, 2012 at 01:47 PM
Grayed out components on a prefab means it's not a prefab created in Unity but it's a ModelPrefab that has been imported. Imported prefabs can't be edited in Unity since it's usually an FBX file which can't be changed by Unity.
The usualy way when you want to edit the prefab in general is to create another prefab in Unity and fill it with imported model. Now you can edit the components of the prefab, but the animations are still imported assets in the modelprefab. You can duplicate animationclips by pressing "CTRL + D". You have to replace the AnimationClip in the AnimationComponent's animations array with your newly created asset. This duplicated AnimationClip can be edited in Unity.