Created
March 15, 2017 13:44
-
-
Save arun02139/0788b895165569ec5ab54a4998f23405 to your computer and use it in GitHub Desktop.
Custom inspector to look at the coordinate values (that should be getting serialized but aren't)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using UnityEditor; | |
[CustomEditor(typeof(MyHexagon))] | |
public class MyHexagonInspector : Editor | |
{ | |
public override void OnInspectorGUI() | |
{ | |
var myHex = (MyHexagon)target; | |
base.OnInspectorGUI (); | |
EditorGUILayout.LabelField("offsetCoord:", myHex.offsetCoord.PrettyPrint()); | |
EditorGUILayout.LabelField("cubeCoord:", myHex.cubeCoord.PrettyPrint()); | |
EditorUtility.SetDirty( target ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment