Not signed in
Copyright © 2026 Unity Technologies
How to reproduce:
1. Create a new Unity project
2. In the Hierarchy window create a new GameObject (right-click> 3D Object > Cube)
3. Select Cube GameObject in the Hierarchy window
4. While Cube GameObject is selected in the Inspector window press Add Component
5. In opened sub-menu scroll down and press "New Script"
6. Press "Create and Add" a New Script
7. Observe the error in the Console window
Expected results: no errors are thrown in the Console window
Actual results: error is thrown in the Console window
Reproducible with: 2023.2.0a19
Not reproducible with: 2023.2.0a18
Reproduced on: Ubuntu 20.04
Not reproducible on: macOS ventura 13.4
Note: full error (error is clearable):
ullReferenceException: Object reference not set to an instance of an object UnityEditor.EditorStyles.get_label () (at /home/bokken/build/output/unity/unity/Editor/Mono/GUI/EditorStyles.cs:18) UnityEditor.Events.InterceptedEventsPreview+Styles..ctor () (at ./Library/PackageCache/com.unity.ugui@2.0.0/Editor/UGUI/UI/InterceptedEventsPreview.cs:25) UnityEditor.Events.InterceptedEventsPreview..ctor () (at ./Library/PackageCache/com.unity.ugui@2.0.0/Editor/UGUI/UI/InterceptedEventsPreview.cs:55) System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean wrapExceptions, System.Boolean skipCheckThis, System.Boolean fillCache) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Boolean wrapExceptions, System.Threading.StackCrawlMark& stackMark) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic, System.Boolean wrapExceptions) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) System.Activator.CreateInstance (System.Type type) (at <4930970ba45b4c08aa04afc5f0dc7577>:0) UnityEditor.PropertyEditor.GetPreviewsForType (UnityEditor.Editor editor) (at /home/bokken/build/output/unity/unity/Editor/Mono/Inspector/PropertyEditor.cs:975) UnityEditor.PropertyEditor.CreatePreviewables () (at /home/bokken/build/output/unity/unity/Editor/Mono/Inspector/PropertyEditor.cs:930) UnityEditor.PropertyEditor.RebuildContentsContainers () (at /home/bokken/build/output/unity/unity/Editor/Mono/Inspector/PropertyEditor.cs:1120) UnityEditor.InspectorWindow.RedrawFromNative () (at /home/bokken/build/output/unity/unity/Editor/Mono/Inspector/InspectorWindow.cs:202)
Sign in to see your voted issues