Search Issue Tracker

Fixed in 2020.1

Fixed in 2019.3

Votes

0

Found in

2019.2.0a7

2020.1.0a17

Issue ID

1206697

Regression

Yes

[TreeCreator] NullReferenceException on modifying properties of "Tree" components when "Branch Material" is set to any material

IMGUI

-

Editor throws NullReferenceException when a material is assigned to Branch Material and properties of Tree component are modified. refer attached video

Steps to repro:
1. Create a new Project.
2. Hierarchy > GameObject > 3D > Tree.
3. In Inspector > Tree > Branch Material > Default-Skybox > Add
4. Modifying any properties under Tree component in the Inspector.

Actual Result:
NullReferenceException errors in the console.

Expected Result:
No errors in the console.

Reproducible in:
2020.1.0a17, 2019.3.0f5 (9134dab13572), 2019.2.14f1, 2019.2.0a7

Working Fine in:
2019.2.0a6, 2019.1.14f1

Environment:
Windows10 and macOS 10.14

Stack trace:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorGUI.HasKeyboardFocus (System.Int32 controlID) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.DoNumberField (UnityEditor.EditorGUI+RecycledTextEditor editor, UnityEngine.Rect position, UnityEngine.Rect dragHotZone, System.Int32 id, System.Boolean isDouble, System.Double& doubleVal, System.Int64& longVal, System.String formatString, UnityEngine.GUIStyle style, System.Boolean draggable, System.Double dragSensitivity) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.DoFloatField (UnityEditor.EditorGUI+RecycledTextEditor editor, UnityEngine.Rect position, UnityEngine.Rect dragHotZone, System.Int32 id, System.Single value, System.String formatString, UnityEngine.GUIStyle style, System.Boolean draggable, System.Single dragSensitivity) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.DoFloatField (UnityEditor.EditorGUI+RecycledTextEditor editor, UnityEngine.Rect position, UnityEngine.Rect dragHotZone, System.Int32 id, System.Single value, System.String formatString, UnityEngine.GUIStyle style, System.Boolean draggable) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.DoSlider (UnityEngine.Rect position, UnityEngine.Rect dragZonePosition, System.Int32 id, System.Single value, System.Single sliderMin, System.Single sliderMax, System.String formatString, System.Single textFieldMin, System.Single textFieldMax, System.Single power, UnityEngine.GUIStyle textfieldStyle, UnityEngine.GUIStyle sliderStyle, UnityEngine.GUIStyle thumbStyle, UnityEngine.Texture2D sliderBackground, UnityEngine.GUIStyle thumbStyleExtent) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.DoSlider (UnityEngine.Rect position, UnityEngine.Rect dragZonePosition, System.Int32 id, System.Single value, System.Single left, System.Single right, System.String formatString, System.Single power, UnityEngine.GUIStyle textfieldStyle, UnityEngine.GUIStyle sliderStyle, UnityEngine.GUIStyle thumbStyle, UnityEngine.Texture2D sliderBackground, UnityEngine.GUIStyle thumbStyleExtent) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.DoSlider (UnityEngine.Rect position, UnityEngine.Rect dragZonePosition, System.Int32 id, System.Single value, System.Single left, System.Single right, System.String formatString, UnityEngine.GUIStyle textfieldStyle, System.Single power) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.PowerSlider (UnityEngine.Rect position, UnityEngine.GUIContent label, System.Single sliderValue, System.Single leftValue, System.Single rightValue, UnityEngine.GUIStyle textfieldStyle, System.Single power) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.Slider (UnityEngine.Rect position, UnityEngine.GUIContent label, System.Single value, System.Single leftValue, System.Single rightValue, UnityEngine.GUIStyle textfieldStyle) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUI.Slider (UnityEngine.Rect position, UnityEngine.GUIContent label, System.Single value, System.Single leftValue, System.Single rightValue) (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.EditorGUILayout.Slider (UnityEngine.GUIContent label, System.Single value, System.Single leftValue, System.Single rightValue, UnityEngine.GUILayoutOption[] options) (at <50c2886429a849e8b640d0aca52729fc>:0)
TreeEditor.TreeEditor.GUISlider (TreeEditor.TreeEditor+PropertyType prop, System.String contentID, System.Single value, System.Single minimum, System.Single maximum, System.Boolean hasCurve) (at <50c2886429a849e8b640d0aca52729fc>:0)
TreeEditor.TreeEditor.InspectorDistribution (TreeEditor.TreeData treeData, TreeEditor.TreeGroup group) (at <50c2886429a849e8b640d0aca52729fc>:0)
TreeEditor.TreeEditor.InspectorBranch (TreeEditor.TreeData treeData, TreeEditor.TreeGroupBranch group) (at <50c2886429a849e8b640d0aca52729fc>:0)
TreeEditor.TreeEditor.OnInspectorGUI () (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <50c2886429a849e8b640d0aca52729fc>:0)
UnityEditor.UIElements.Tooltip:SetTooltip(Single, Single)

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.