Created
October 12, 2011 10:32
Revisions
-
Emil Johansen revised this gist
Oct 12, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public MyInspector (Editor proxy) public void OnInspectorGUI () { GUILayout.Label ("KAN HAZ INSPECTAR?!"); GUILayout.Label (string.Format ("Target: {0}", proxy.target == null ? "none" : proxy.target.ToString ())); } -
Emil Johansen created this gist
Oct 12, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ ///////////////////////////////////////////////////////////////// // MyProxy.cs - the C# source file in your assets ///////////////////////////////////////////////////////////////// using UnityEngine; using UnityEditor; using MyAssemblyNamespace; [CustomEditor (typeof (MyBehaviour))] public MyProxy : Editor { MyInspector owner; public MyProxy () { owner = new MyInspector (this); } public override void OnInspectorGUI () { owner.OnInspectorGUI (); } /* ... */ } ///////////////////////////////////////////////////////////////// // MyInspector.cs - the actual inspector code built to assembly ///////////////////////////////////////////////////////////////// using UnityEngine; using UnityEditor; public class MyInspector { Editor proxy; public MyInspector (Editor proxy) { this.proxy = proxy; } public void OnInspectorGUI () { GUILayout.Label ("KAN HAZ INSPECTAR?!"); GUILayout.Label (string.Format ("Target: {0}", proxy.target == null ? "none" : target.ToString ())); } /* ... */ }