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
- “FMOD failed to set the software format to the custom sample rate…” warnings are thrown as System Sample Rate value is being changed in Audio section of Project Settings window
- VFX Marquee selection does match the visual indicator
- “Invalid AABB aabb” errors are spammed when “Infinity” value is entered in Collider Component fields
- Editor Role does not sync with the MPPM Play Mode Scenario Role when entering Play mode
- Long asset names cause overlap with the “Find” function in search result tabs
Resolution Note:
This use case is an extreme edge case in an uncommon workflow