Your comments
Hi Joachim - yep currently the only way.
Hm, I see... looked into the docs and i'm shocked :O.
Here is a starting point (at least for scrollbars and styling things):
Hm, I see... looked into the docs and i'm shocked :O.
Here is a starting point (at least for scrollbars and styling things):
using UnityEngine; using UnityEditor; public class ExampleEditor : EditorWindow { string fieldValue = "Some Value"; Vector2 scrollPosition = Vector2.zero; [MenuItem ("Window/My Window")] public static void ShowWindow () { EditorWindow.GetWindow(typeof(ExampleEditor)); } void OnGUI () { // Fetch the text area style from the current GUI skin GUIStyle textAreaStyle = GUI.skin.textArea; // Change some definitions textAreaStyle.richText = true; textAreaStyle.padding.left = 10; textAreaStyle.padding.top = 10; textAreaStyle.padding.right = 10; textAreaStyle.padding.bottom = 10; textAreaStyle.stretchHeight = true; // Create a space for the text area Rect bounds = new Rect(5, 10, Screen.width - 10, Screen.height - 40); // Define a scrollable area GUILayout.BeginArea(bounds); scrollPosition = GUILayout.BeginScrollView(scrollPosition); // Add the text area fieldValue = EditorGUILayout.TextArea (fieldValue, textAreaStyle, GUILayout.MinWidth(bounds.width - 30 ), GUILayout.MaxHeight(bounds.height)); GUILayout.EndScrollView(); GUILayout.EndArea(); } }
Zooming should be disabled in edit mode - "the Focus" if possible should be set to the input field.
Customer support service by UserEcho
my Addition to that topic would be the following possible solution:
A node that reads a ".cginc" file and presents a dropdown to import a specific function. The node should generate the input vars from the function definition and the rest can act like the code-node!?