Search Issue Tracker
Fixed in 1.8.6
Found in [Package]
[Timeline] MissingReferenceExceptions when undoing Add Animator from Timeline
# Open attached timline-error-repro-compressed.zip project.
# Open Assets > Scenes > Gameplay scene.
# Open the timeline window and open the timeline in the prefab in Hierarchy (The timeline is nested under IntroCutscene -> IntroCutscene.)
# Add an animation track.
# Create an empty GameObject, add it to the animation track. Select "Create Animator on GameObject".
# Click record on the animation track.
# Press Ctrl+Z
*Expected Outcome:* No errors occur. Would expect either the addition of the animator to the GameObject or the addition of the GameObject to the animation track is undone.
*Actual Outcome:* 300+ errors "MissingReferenceException: The object of type 'UnityEngine.Animator' has been destroyed but you are still trying to access it."
Reproducible on: 2023.2.0b4
*NOTE: I was unable to open the project in past streams so could not regression test further. I've set regression as 'no' but it's possible this is a regression, may require further processing?*
* Tested on Windows 10.
* Couldn't repro with an empty project and these steps.
MissingReferenceException: The object of type 'UnityEngine.Animator' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object+MarshalledUnityObject.TryThrowEditorNullExceptionObject (UnityEngine.Object unityObj, System.String parameterName) (at <29a5a5c1c02c4c21a41aabaf05ea6ea4>:0)
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at <29a5a5c1c02c4c21a41aabaf05ea6ea4>:0)
UnityEngine.Component.get_transform () (at <29a5a5c1c02c4c21a41aabaf05ea6ea4>:0)
UnityEditor.Timeline.WindowState.AllowRecordingPrefabPropertyOverridesFor (System.Object componentOrGameObject) (at ./Library/PackageCachefirstname.lastname@example.org/Editor/State/WindowState.cs:1062)
UnityEditor.PrefabUtility.AllowRecordingPrefabPropertyOverridesFor (UnityEngine.Object componentOrGameObject) (at <4af022610df640d8a1f2312ee498e664>:0)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Crash on AudioUtil_CUSTOM_HasAudioCallback when entering PlayMode while the GameObject's Properties Inspector window is in Debug mode
- Tilemap Collider 2D is not updating the Collider shapes when removing Tiles on the Tilemap component
- Inspector with the scrollbar is unusable when Material properties are edited and the scene is saved
- The Rendering Profiler module statistics are zero when Application.targetFrameRate is set
- The Editor becomes unresponsive and memory allocation errors are spammed in the Console when Generating Lightning