Psd2UnityImporter icon indicating copy to clipboard operation
Psd2UnityImporter copied to clipboard

Copied style is null. Using StyleNotFound instead.

Open willlogs opened this issue 6 years ago • 3 comments

this is weird! I'm using unity 2018.3.5f1 I'm getting these in console:

Copied style is null. Using StyleNotFound instead. UnityEngine.GUIStyle:.ctor(GUIStyle) SubjectNerd.PsdImporter.PsdImportWindow:LoadStyles() (at Assets/PsdToUnity/Editor/PsdImportWindow.cs:170) SubjectNerd.PsdImporter.PsdImportWindow:OnGUI() (at Assets/PsdToUnity/Editor/PsdImportWindow.cs:352) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

NullReferenceException: Object reference not set to an instance of an object SubjectNerd.PsdImporter.PsdImportWindow.LoadStyles () (at Assets/PsdToUnity/Editor/PsdImportWindow.cs:174) SubjectNerd.PsdImporter.PsdImportWindow.OnGUI () (at Assets/PsdToUnity/Editor/PsdImportWindow.cs:352) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310) UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361) UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

willlogs avatar Apr 14 '19 07:04 willlogs

Same problem Unity 2019.2.2f1

Apoll0 avatar Aug 29 '19 06:08 Apoll0

Try change PsdImportWindow.cs, row 220 tempStyle = GUI.skin.FindStyle("VisibilityToggle"); to tempStyle = GUI.skin.FindStyle("Toggle");

Apoll0 avatar Aug 29 '19 07:08 Apoll0

Same problem on 2019.2.8f1 @Apoll0 solution worked for me.

paternostrox avatar Oct 05 '19 22:10 paternostrox