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

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&)

  1. Resolution Note:

    This use case is an extreme edge case in an uncommon workflow

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.