Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

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

Releases

No releases published

Packages

No packages published

Languages