Search Issue Tracker
Fixed in 2019.3
[Terrain] Throws NullReference Exception on adding Terrain component to GO when paint texture is selected
Throws NullReference Exception on adding Terrain component to GO when paint texture is selected under paint terrain.
Steps to repro:
1. Create a new project.
2. Hierarchy > Right-click > Create Empty
3. Add Component > Terrain Collider > Terrain
4. Assign Terrain data and terrain asset
5. Hierarchy > GameObject > Terrain > Paint Terrain > Paint Texture
NullReference exceptions are thrown.
No exceptions are thrown in the console.
2019.3.0a11, 2019.3.0a5, 2019.2.0f1, 2019.2.0b10
Working Fine in:
2019.3.0a4, 2019.2.0b9, 2019.1.0f2
Windows and Mac.
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Experimental.TerrainAPI.PaintTextureTool.OnInspectorGUI (UnityEngine.Terrain terrain, UnityEditor.Experimental.TerrainAPI.IOnInspectorGUI editContext) (at /Users/builduser/buildslave/unity/build/Modules/TerrainEditor/PaintTools/PaintTextureTool.cs:105)
UnityEditor.TerrainInspector.ShowPaint () (at /Users/builduser/buildslave/unity/build/Modules/TerrainEditor/TerrainInspector.cs:1499)
UnityEditor.TerrainInspector.OnInspectorGUI () (at /Users/builduser/buildslave/unity/build/Modules/TerrainEditor/TerrainInspector.cs:2000)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass53_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:494)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Perforce integration - Attempting to add a P4Ignore ignored file does nothing
- [GPU PLM] 100% repro crash when baking EnterTheRoom with 4K maps when using system allocator
- Characters in text fields are shown in GUI.TextArea when IME characters are typed in Editor's search fields
- [CPU PLM] LODs which have a small geometry are not baking correctly
- OnDrawGizmos function is not called when the "Enter Play Mode Options" is enabled