All Projects → PixeyeHQ → Unity3d-Tags-Filters

PixeyeHQ / Unity3d-Tags-Filters

Licence: MIT license
Extending a Unity3d Inspector window to show int tags

Programming Languages

C#
18002 projects

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].