+1
Fixed

Adding Code node in unity 5.2f1 will cause Error

ShuraK 9 years ago updated by Freya Holmér (Developer) 9 years ago 7
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)

Answer

Answer
Fixed
This has now been fixed in 1.19
Under review
I'll look into this for 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'll look into this tonight
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

Answer
Fixed
This has now been fixed in 1.19