0
Fixed

Errors on version 1.3.0

Mark Gemmell 2 years ago updated by jackielo 2 years ago 3

When I open the ShaderWeaver window (v 1.3.0), having updated from the previous version, in Unity 2017.1.0f3, I get an error.


This is after deleting the temp and library folders in my project and all assets being re-imported.


The error is 
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,UnityEngine.Shader].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
ShaderWeaver.SWEditorUI.GetShader (System.String name) (at Assets/Tools/ShaderWeaver/Plugin/Scripts/Editor/EditorCommon/SWEditorUI.cs:112)
ShaderWeaver.SWWindowLayoutV.OnGUI () (at Assets/Tools/ShaderWeaver/Plugin/Scripts/Editor/Window/SWWindowLayoutV.cs:238)
ShaderWeaver.SWWindowMain.OnGUI () (at Assets/Tools/ShaderWeaver/Plugin/Scripts/Editor/Window/SWWindowMain.cs:283)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:272)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:265)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:232)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


Under review

Hi Mark,

Please Try

(1) Delete entire Shader Weaver folder and import package.

(2) Check whether you have other folder also named 'ShaderWeaver', if so there might be a folder confilt,just rename other folder with a different name.


Thank you, I had a second ShaderWeaver folder.  The problem is now resolved.

Fixed

Next version will check contents in folder 'ShaderWeaver', so you can have other folder named 'ShaderWeaver'. It should be fine in next version.