Skip to content

Instantly share code, notes, and snippets.

@arun02139
Created March 9, 2017 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun02139/6cb65332675cf84e9e7e8f28a6591eac to your computer and use it in GitHub Desktop.
Save arun02139/6cb65332675cf84e9e7e8f28a6591eac to your computer and use it in GitHub Desktop.
Custom inspector trying to expose 'state' of battle at any time
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(Battle))]
public class BattleInspector : Editor
{
public override void OnInspectorGUI()
{
var battle = (Battle)target;
EditorGUILayout.LabelField("State", battle.battleStateName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment