Skip to content

NullReferenceException when creating a new variable #17

@Mattias-TB

Description

@Mattias-TB

I am using Unity 2021.3.6f1 and have installed using the Package Manager:

image

I am getting a NullReferenceException when trying to create a new Variable of type Int, I can still create Events without problems.

NullReferenceException: Object reference not set to an instance of an object
GenericUnityObjects.Util.GenericTypesDatabase`1[TObject].TryGetConcreteTypeImpl (System.Type genericType, System.Type& concreteType) (at Library/PackageCache/[email protected]/Runtime/Util/GenericTypesDatabase/GenericTypesDatabase.cs:115)
GenericUnityObjects.Util.GenericTypesDatabase`1[TObject].TryGetConcreteType (System.Type genericType, System.Type& concreteType) (at Library/PackageCache/[email protected]/Runtime/Util/GenericTypesDatabase/GenericTypesDatabase.cs:94)
GenericUnityObjects.Editor.ScriptableObjects.GenericSOCreator.CreateAssetInteractively (System.Type genericTypeWithoutArgs, System.Type[] genericArgs, System.String fileName) (at Library/PackageCache/[email protected]/Editor/ScriptableObjects/GenericSOCreator.cs:107)
GenericUnityObjects.Editor.ScriptableObjects.GenericSOCreator+<>c__DisplayClass5_0.<CreateAsset>b__0 (System.Type[] genericArgs) (at Library/PackageCache/[email protected]/Editor/ScriptableObjects/GenericSOCreator.cs:35)
GenericUnityObjects.Editor.ScriptableObjects.SelectionWindow.OneTypeSelectionWindow+<>c__DisplayClass2_0.<GetDropdownTree>b__0 (System.Type type) (at Library/PackageCache/[email protected]/Editor/ScriptableObjects/SelectionWindow/OneTypeSelectionWindow.cs:32)
UnityDropdown.Editor.DropdownMenu`1[T].FinalizeSelection () (at Library/PackageCache/[email protected]/Editor/DropdownMenu`1.cs:78)
UnityDropdown.Editor.DropdownNode.HandleMouseEvents () (at Library/PackageCache/[email protected]/Editor/DropdownNode.cs:170)
UnityDropdown.Editor.DropdownNode.Draw (System.Int32 indentLevel, UnityEngine.Rect visibleRect) (at Library/PackageCache/[email protected]/Editor/DropdownNode.cs:187)
UnityDropdown.Editor.DropdownNode.DrawSelfAndChildren (System.Int32 indentLevel, UnityEngine.Rect visibleRect) (at Library/PackageCache/[email protected]/Editor/DropdownNode.cs:102)
UnityDropdown.Editor.DropdownNode.DrawSelfAndChildren (System.Int32 indentLevel, UnityEngine.Rect visibleRect) (at Library/PackageCache/[email protected]/Editor/DropdownNode.cs:108)
UnityDropdown.Editor.DropdownMenu.DrawTree (UnityEngine.Rect visibleRect) (at Library/PackageCache/[email protected]/Editor/DropdownMenu.cs:192)
UnityDropdown.Editor.DropdownMenu.Draw () (at Library/PackageCache/[email protected]/Editor/DropdownMenu.cs:108)
UnityDropdown.Editor.DropdownWindow.DrawContent () (at Library/PackageCache/[email protected]/Editor/DropdownWindow.cs:105)
UnityDropdown.Editor.DropdownWindow.OnGUI () (at Library/PackageCache/[email protected]/Editor/DropdownWindow.cs:63)
UnityEditor.HostView.OldOnGUI () (at <44a70d1b13cf47e29810e30f45ffae08>: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 <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <7096c6494db14f0c807ca461735e58a8>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <89d2c0fe37e0454991daf2807b7dcb63>:0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions