示例#1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        GridPosition myScript = (GridPosition)target;

        if (GUILayout.Button(" Move UP ^ "))
        {
            myScript.EditorMoveUp();
        }
        if (GUILayout.Button("! Move DOWN "))
        {
            myScript.EditorMoveDown();
        }

        if (GUILayout.Button(" Move RIGHT -> "))
        {
            myScript.EditorMoveRight();
        }
        if (GUILayout.Button(" <- Move LEFT "))
        {
            myScript.EditorMoveLeft();
        }
    }