Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4
2019.4
2020.1
2020.2
2020.2.0a16
Issue ID
1258066
Regression
No
[Terrain] MissingReferenceException is thrown on exiting Prefab mode after opening Add tree window in Terrain
MissingReferenceException is thrown on exiting Prefab mode after opening Add tree window in Terrain and focusing on the Add tree window. Refer the attached video
Steps to reproduce:
1) Create a new project
2) GameObject > 3D Object > Terrain
3) Drag Terrain to Project folder and make a Prefab
4) Select Terrain in Project > Open Prefab
5) Paint trees > Edit trees > Add tree
6) Exit Prefab mode > Hover over Add tree window
Actual result: MissingReferenceException is thrown on exiting Prefab mode
Expected result: No errors should be thrown in console
Occurring in: 2020.2.0a16, 2020.1.0b14, 2019.4.2f1, 2018.4.20f1
Environment: Both Windows and Mac
Stack trace:
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.TreeWizard.DrawWizardGUI () (at <96f7020efbd94777ae30ab44c007998b>:0)
UnityEditor.ScriptableWizard.OnGUI () (at <96f7020efbd94777ae30ab44c007998b>:0)
UnityEditor.HostView.OldOnGUI () (at <96f7020efbd94777ae30ab44c007998b>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <434515d9f4bb4f26bab9aa61f75e4922>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
This use case is an extreme edge case in an uncommon workflow