public override void Draw() { base.Draw(); _in.Rect = new Rect(Rect.position.x - 55, Rect.position.y, 50, 50); _in?.Draw(); _out.Rect = new Rect(Rect.position.x + Rect.width, Rect.position.y, 50, 50); _out?.Draw(); GUILayout.BeginArea(Rect); Prefab = EditorGUILayout.ObjectField(Prefab, typeof(GameObject), true); if (GUILayout.Button("Spawn)")) { var go = GameObject.Instantiate(Prefab) as GameObject; } _input.Value = EditorGUILayout.IntSlider("Modifier: ", _input.Value, 0, 10); _transformation.Value = _display.Value + _input.Value; GUILayout.Label("Input: " + _input?.Value); GUILayout.Label("Display: " + _display?.Value); GUILayout.Label("Output: " + _transformation.Value); GUILayout.EndArea(); var rect = new Rect(Rect.x - 5 + Rect.width / 2, Rect.y - 5 + Rect.height / 2, Rect.width / 2, Rect.height / 2); GUI.Box(rect, GUIContent.none); GUI.Label(rect, "ADD", new GUIStyle(Style) { fontSize = 55, alignment = TextAnchor.MiddleCenter }); }
public override void Draw() { base.Draw(); _in.Rect = new Rect(Rect.position.x - 55, Rect.position.y, 50, 50); _in?.Draw(); GUILayout.BeginArea(Rect); var value = _node?.Value; GUILayout.Label("Value :: " + value); GUILayout.EndArea(); }