keijiro/AICommand

[Unity 2022.2.11f1] NullReferenceException: Object reference not set to an instance of an object

Maxime66410 opened this issue · 2 comments

Unity version 2022.2.11f1

API Key is set.
File exist on UserSettings/AICommandSettings.asset

image

I click on the button

image

NullReferenceException: Object reference not set to an instance of an object
AICommand.OpenAIUtil.InvokeChat (System.String prompt) (at Assets/Editor/OpenAIUtil.cs:52)
AICommand.AICommandWindow.RunGenerator () (at Assets/Editor/AICommandWindow.cs:38)
AICommand.AICommandWindow.OnGUI () (at Assets/Editor/AICommandWindow.cs:64)
UnityEditor.HostView.OldOnGUI () (at <9dccbc75b8a249d78358fb192f335670>: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 <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <f27c4d00c2c54006a12ee4466f2538da>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <a7f6f3a1791146c5a8c571ac1afd5641>:0)

Please check the FAQ on README ("AICommandWindow throws NullReferenceException").

I close this issue as answered. Please reopen it if it still reproduces after checking the billing status.