protected override void NodeGUI() { using (var hscope = new GUILayout.HorizontalScope()) { clip = RTEditorGUI.ObjectField <AnimationClip>("Animation Clip", clip, true); } }
public override void NodeGUI() { GUILayout.Space(5); GUILayout.BeginVertical("Box"); waitUntilFinished = RTEditorGUI.Toggle(waitUntilFinished, "Wait until finished"); fadeTime = RTEditorGUI.FloatField("Fade Time", fadeTime); bgm = RTEditorGUI.ObjectField(bgm, false); GUILayout.EndVertical(); //Don't know why this code needs to be here exactly, but it makes everything nicer? maybe add to some static stuff? GUILayout.BeginHorizontal(); RTEditorGUI.labelWidth = 50; GUILayout.EndHorizontal(); }
public override void NodeGUI() { outputKnob.DisplayLayout(); Texture2D newTex = RTEditorGUI.ObjectField(tex, false); if (GUI.changed) { // Texture has been changed try { // Check for readability and update tex newTex.GetPixel(0, 0); tex = newTex; } catch (UnityException) { // Texture is not readable Debug.LogError("Texture is not readable!"); } NodeEditor.curNodeCanvas.OnNodeChange(this); } }
public override void NodeGUI() { GameObject go = RTEditorGUI.ObjectField(Enemy, allowSceneObjects: false); if (GUI.changed) { if (go && go.GetComponent <Enemy>()) { _enemy = go; } } //EditorGUI.ObjectField(new Rect(0,0,100,100), enemy, typeof(Enemy),false); // (WaveModel) EditorGUILayout.ObjectField(model, typeof(WaveModel), true); Delay = RTEditorGUI.IntField("Spawn delay", Delay); _enemiesCount = RTEditorGUI.IntField("Spawn count", this.EnemiesCount); _spawnInterval = RTEditorGUI.IntField("Spawn interval", this.SpawnInterval); if (GUI.changed) { NodeEditor.curNodeCanvas.OnNodeChange(this); } }