
+1
Fixed
Adding Code node in unity 5.2f1 will cause Error
Got the following error with the lastet unity and shader forge when tring to add a CODE node:
MissingFieldException: Field 'UnityEngine.TextEditor.pos' not found.
ShaderForge.SF_Node_Resizeable.NeatWindow ()
ShaderForge.SF_Node.DrawWindow ()
ShaderForge.SF_Node_Resizeable.Draw ()
ShaderForge.SF_EditorNodeView.OnLocalGUI (Rect r)
ShaderForge.SF_Editor.OnGUI ()
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-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
MissingFieldException: Field 'UnityEngine.TextEditor.pos' not found.
ShaderForge.SF_Node_Resizeable.NeatWindow ()
ShaderForge.SF_Node.DrawWindow ()
ShaderForge.SF_Node_Resizeable.Draw ()
ShaderForge.SF_EditorNodeView.OnLocalGUI (Rect r)
ShaderForge.SF_Editor.OnGUI ()
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-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Answer

0
Answer
Fixed
Freya Holmér (Developer) 9 years ago
This has now been fixed in 1.19

+1. Careful if deciding to update to Unity 5.2 (which is now public), because you can't really open/edit any shaders with a code node.

I just ran into this in my own script code. Looks like they changed UnityEngine.TextEditor.pos to UnityEngine.TextEditor.cursorIndex, and UnityEngine.TextEditor.selectPos to UnityEngine.TextEditor.selectIndex

Thanks :)
I actually never had the time to look into it - about to hit a deadline tonight on another project, so I appreciate the help!
I'll try to make time tonight again
I actually never had the time to look into it - about to hit a deadline tonight on another project, so I appreciate the help!
I'll try to make time tonight again
Customer support service by UserEcho