PropertyInspector is a improved DefaultInspector for the Unity3d game engine. It's tested with Unity 4 and may work with older versions.
For debug purposes you may want to view the values of properties and unserialized fields of your MonoBehaviors. With the PropertyInspector this is very easy.
This is free software and it is provided under MIT license that is distributed with this package.
If you have a question or contribution to the PropertyInspector visit our GitHub Project.
To build the readme on Windows and VisualStudio you have to install Pandoc and MiKTeX.
Select in the Menu "Assets/Import Package/Custom Package" Select your local copy of "PropertyInspector.unitypackage"
Download the sources from Github. Unpack Editor.cs ShowInInspector.cs to your projects Assets directory.
Just add the attribute ShowInInspector to the property which should be displayed. Note that the getter must be public.
[ShowInInspector]
public Vector3 GlobalPosition
{
Get { return this.transform.position; }
}
Instead of inherit from UnityEditor.Editor inherit from PropertyInspector.Editor. Don't forget to call base.OnInspectorGUI if you override OnInspectorGUI.
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(CustomBehavior))]
public class CustomInspector : PropertyInspector.Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (GUILayout.Button("Do Fun"))
{
Debug.Log("Fun");
}
}
}