NullReferenceException

Avatar
  • updated
  • Planned

i bought this asset today and when trying to create a shape (whatever it is, line, rectangle etc...) i got NullReferenceException.

details:

NullReferenceException: Object reference not set to an instance of an object
Shapes.ShapesColorFieldDrawer.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Assets/Shapes/Scripts/Editor/Utils/ShapesColorFieldDrawer.cs:13)
UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
Shapes.ShapeRendererEditor.PropertyFieldColor () (at Assets/Shapes/Scripts/Editor/Components/ShapeRendererEditor.cs:230)
Shapes.LineEditor.OnInspectorGUI () (at Assets/Shapes/Scripts/Editor/Components/LineEditor.cs:66)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.b__0 () (at :0)

Reporting a bug? please specify Unity version:
2021.2.7f1
Reporting a bug? please specify Shapes version:
4.1.1
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
Freya Holmér creator

this has now been fixed in 4.1.2

Avatar
Freya Holmér creator
  • Planned

I'll fix this for the next update!

Avatar
Lei
Quote from Freya Holmér

does it work if you restart Unity? sometimes the first time import has weird behavior

ok it works after restart... thx for ur quick answer!

Avatar
Freya Holmér creator

does it work if you restart Unity? sometimes the first time import has weird behavior