Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

MissingReferenceException on legacy animation SOMETIMES -- 5.1.2p2 (bug?)

Discussion in 'Animation' started by Simurr, Aug 6, 2015.

  1. Simurr

    Simurr

    Joined:
    Jan 2, 2012
    Posts:
    9
    We have an legacy animation that is linked in the inspector (Serialized private Animation field).
    An event fires a function that triggers the animation to play.

    Most of the time this works. Sometimes we get this
    MissingReferenceException: The object of type 'Animation' has been destroyed but you are still trying to access it.

    The object is loaded with the scene and never destroyed. The animation or the object it's attached to are never destroyed or turned off. The animation simply activates some child objects and changes some script values on those child objects.

    Everything still exists in the editor. Is this a bug in Unity or something to do with Legacy animations? I'm not getting any useful search results if it is a known bug.

    sim
     
  2. Simurr

    Simurr

    Joined:
    Jan 2, 2012
    Posts:
    9
    Disregard. It was an issue with a singleton holding on to a reference to the script attached to an object, but the object was destroyed during scene load.
     
unityunity