+3

Editor won't open in latest version of Unity 2017.1.0p5 - SF v1.38

jimmyjamesbond 5 months ago • updated by Zack Black 4 weeks ago 3

This is a fresh Unity install and fresh SF install. Reset layout to factory. Open Shader Forge and get the following:

NullReferenceException: Object reference not set to an instance of an object

ShaderForge.SF_PreviewWindow.SetupPreview ()
ShaderForge.SF_PreviewWindow..ctor (ShaderForge.SF_Editor editor)
ShaderForge.SF_Editor.InitializeInstance (UnityEngine.Shader initShader)
ShaderForge.SF_Editor.Init (UnityEngine.Shader initShader)
ShaderForge.SF_Editor.InitEmpty ()

NullReferenceException: Object reference not set to an instance of an object

ShaderForge.SF_Editor.Update ()
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.SendUpdate () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:341)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:109)

NullReferenceException: Object reference not set to an instance of an object

ShaderForge.SF_Editor.OnDestroy ()
UnityEditor.EditorWindow:Close()
ShaderForge.SF_Editor:Update()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Hi JJBond, did you ever get a fix for this?

I'm still struggling with this in every build of 2017. Have to keep Unity 5 installed so I can open SF and then manually transfer the shaders to 2017 projects. Very inconvenient.

I want to clarify for anyone searching for the solution to this problem in Unity 2017. The Asset Store is finding an old version in the cache folder instead of downloading the latest (currently v1.38) On a Mac, you need to navigate to Users\XXX\Library\Unity\Asset Store-5.x and delete the folder "Joachim Holmr". You can then download Shader Forge from the Asset Store normally and it will install and open. Many thanks to Keenan Woodall for finally solving this.