• Stars
    star
    468
  • Rank 93,767 (Top 2 %)
  • Language
    C#
  • License
    MIT License
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Group variables in Unity 3d inspector with style!

license Join the chat at https://discord.gg/ukhzx83

InspectorFoldoutGroup

Group variables in Unity 3d inspector with style!

https://gyazo.com/9f18eab9dfb123d928aecf7daa3e01da

https://gyazo.com/4e6566c2fca783e4cd557f95713a4ab5

How to use

Put attribute before variable and you are done !

[Foldout("DESIRED_NAME")]
  public class Player : MonoBehaviour
{
	[Foldout("Setup")] public Transform selfTransform;
	
	[Foldout("Data")] public int HP;
	[Foldout("Data")] public int AT;
 
}

You don't need to write [Foldout] attribute each time! Instead, you can add "true" bool check afther naming to put all properties to the specified group

  public class Player : MonoBehaviour
{
	[Foldout("DATA OBJECT", true)] 
	public int hp;
	public int attack = 20;
	[SerializeField]
	private GameObject self;
	
	[Foldout("DATA ATTACK")] 
	public int AT;
 
}

https://gyazo.com/2ce500e63fd604de8098aece2fa354fa

Other content

  • Tag filters - an extension to add foldable groups to the inspector.
  • ACTORS - Unity3d data-driven framework I'm currently working on.