Skip to content

Instantly share code, notes, and snippets.

@hiepnd
Last active August 17, 2016 02:20
Show Gist options
  • Save hiepnd/1e6c8d130401c89a1963f51eeccc4c09 to your computer and use it in GitHub Desktop.
Save hiepnd/1e6c8d130401c89a1963f51eeccc4c09 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
using UnityEditor;
using UnityEngine.UI;
[CustomEditor(typeof(JSDebugNode))]
public class DebugNodeEditor : Editor {
public override void OnInspectorGUI ()
{
JSDebugNode node = (JSDebugNode)target;
node.code = GUILayout.TextArea (node.code, GUILayout.Height(200));
if (GUILayout.Button("Execute")) {
node.Eval (node.code);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment