ddionisio / MateAnimator

Adding more features to the open sourced Animator from Unity.
113 stars 29 forks source link

Fragile build it seems. "_animdata" will just disappear. #12

Closed ghost closed 1 year ago

ghost commented 10 years ago

I've had the "_animdata" gameobject mysteriously disappear about 3-4 times. Fortunately, I've made even more of a habit of backing up back ups so I'm ready when this happens again. I was wondering if you can save this to a meta file after it's already been built.

I'm also noticing my mouse cursor will randomly blink and glitch, but I'm not sure if this is a MateAnimator issue or issue with Adventure Creator, NGUI, or Playmaker.

ddionisio commented 10 years ago

Hm...I haven't seen this happen since a while back, it was fixed and had something to do with undo/redo. Might be related to that, since there's been an influx of changes in the undo/redo system within Unity. Other than that, were there any errors when this happened? Were you also using the "Meta" system of the Animator? (the one in the inspector in regards to saving the data as a prefab) That may be related to it.

I'll try to see if I can replicate the issue.

ghost commented 9 years ago

I just had it happen again. I lose work about once a week due to this. Fortunately, I'm in the habit of backing up constantly. I am not using the prefab. Am I able to convert it to prefab somehow?

ghost commented 9 years ago

I just had it happen again. I lose work about once a week due to this. Fortunately, I'm in the habit of backing up constantly. I am not using the prefab. Am I able to convert it to prefab somehow?

ddionisio commented 9 years ago

I've checked in some debug log for when _animdata gets deleted, if it happens again. I need to figure out what the culprit is, so hopefully the stacktrace will help. The only time I explicitly delete _animdata is when AnimatorData component is deleted.

The Meta has some caveats associated with it: game objects associated per track must be inside the hierarchy of the AnimatorData's game object. Children with the same name will not get processed correctly (since reference to the object is identified by their hierarchy path). Also CameraSwitcher doesn't work very well with it. Also, when editing, you must manually save the Meta data (I may automate this someday, I just haven't figured it out). Try it out and see if it works, it can also be used as a backup data.

ddionisio commented 9 years ago

Oh yeah, you could backup the animator data object (or anything on top of its hierarchy) via prefab as well. But again, if there are references to objects outside the prefab's hierarchy, they get lost (just part of unity's way of doing prefabs)

ddionisio commented 1 year ago

This has been fixed a good long while now with better serialization.