Skip to content
This repository has been archived by the owner on May 17, 2020. It is now read-only.

PixeyeHQ/Unity3d-Tags-Filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Unity3d-Tags-Filters

Extending a Unity3d Inspector window to show int tags

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

Demo

What is it?

Tag filter is a small snippet for Unity that allows logically group your int variables in the inspector. It doesn't compete with enums. It is useful when you want to keep things dead simple without unnecessary cast ints to enums.

	public class DemoTags : MonoBehaviour
	{
		// use TagFilter attribute with class type that hold your const ints.
		[TagFilter(typeof(Tags))] public int tag;
	}

	public static class Tags
	{
	    // use tagfiled attribute with param caterogy name.	
		[TagField(categoryName = "entities")] public const int Players = 0;
		[TagField(categoryName = "entities")] public const int Enemies = 1;

		[TagField(categoryName = "signals")] public const int SignalAttack = 2;
		[TagField(categoryName = "signals")] public const int SignalDamage = 3;
		[TagField(categoryName = "signals/effects")] public const int SignalStun = 3;
	}

Other content

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

About

Extending a Unity3d Inspector window to show int tags

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages