aniketrajnish / Text-To-Material-Unity

Generate materials from text prompts in Unity
MIT License
71 stars 8 forks source link

Error while running in Unity #2

Open neoscenic opened 8 months ago

neoscenic commented 8 months ago

Hi, I love this idea and concept. I am trying to create a material and I am getting the following error:

NullReferenceException: Object reference not set to an instance of an object T2M.OpenAIUtil.InvokeChat (System.String prompt, System.String model) (at Assets/Scripts/OpenAI/OpenAIUtil.cs:96) T2M.T2MGenerator.GenerateMaterial (T2M.T2MWindow+CurrentSettings settings, System.String matPrompt, System.String texPrompt, System.String generatedMaterialPath) (at Assets/Scripts/T2M/T2MGenerator.cs:71) T2M.T2MWindow.OnGUI () (at Assets/Scripts/T2M/T2MWindow.cs:85) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <97436df440ca462884c5332c1d8ebbe7>:0) UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <97436df440ca462884c5332c1d8ebbe7>:0) UnityEditor.DockArea.OldOnGUI () (at <97436df440ca462884c5332c1d8ebbe7>: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 <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.EventDispatcher.OpenGate () (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <9d7fc877145d4138982bf12cdd3484c6>:0) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at :0)

neoscenic commented 7 months ago

Are you still developing this project?

aniketrajnish commented 7 months ago

I have an ongoing semester and some job applications that I'm currently working on, will get back to you soon!