public static VariableEditorWindow ShowWindow(UnityEngine.Object from, List <VariableData> variable) { window = GetWindow(typeof(VariableEditorWindow), true) as VariableEditorWindow; window.titleContent = new GUIContent("Variable Editor"); targetObj = from; ESV = variable; window.autoInitializeSupportedType = true; window.minSize = new Vector2(250, 300); window.Show(); return(window); }
public override void OnInspectorGUI() { NodeGroup comp = target as NodeGroup; EditorGUI.BeginChangeCheck(); base.OnInspectorGUI(); if (GUILayout.Button(new GUIContent("Open Variable Editor", "Open Variable Editor to edit this variable"), EditorStyles.toolbarButton)) { VariableEditorWindow VEW = VariableEditorWindow.ShowWindow(comp, comp.variable); VEW.autoInitializeSupportedType = false; } uNodeGUIUtility.ShowField("comment", comp, comp); if (EditorGUI.EndChangeCheck()) { uNodeGUIUtility.GUIChanged(comp); } }