Search Issue Tracker
Fixed in 2017.2.0f3
Fixed in 5.6
[Regression] MissingReferenceException after undoing terrain creation
Steps to repro:
1. Create new project;
2. Add Terrain gameobject (GameObject -> 3D Object -> Terrain);
3. Press Ctrl/cmd+Z or Edit -> Undo Create terrain.
Terrain is deleted without errors.
MissingReferenceException: The object of type 'Terrain' 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.
UnityEditor.TerrainInspector.OnSceneGUICallback (UnityEditor.SceneView sceneView) (at C:/buildslave/unity/build/Editor/Mono/TerrainEditor/TerrainInspector.cs:1803)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2397)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1715)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1585)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
is shown in the console.
Regression introduced in Unity 5.6.0a6.
- Reproducible in 2017.1.0b1, 5.6.0p1, 5.6.0f3, 5.6.0b6;
- Not reproducible in 5.6.0a5, 5.5.2p1;
- Reproducible on both Windows 10 and OSX 10.12.3.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [UI] Unwanted padding is added when maximizing editor windows
- [UI] Area Error tooltip is missing in the Mesh Importer settings
- UIElementsScrollView.ScrollTo() scrolls to the top of the ScrollView when a child of a child of the Scroll View is passed
- Only one of the tracks are affected when selecting multiple Animations tracks and Trying to convert them to Clip/Infinite Track
- Unresponsive front facing UI fields with specific rotations when using World Space canvas with Ignore Reversed Graphics enabled