MultiTagSystem

// A multi tag system that leverages a component with a TagList // and an extension method for easily determining if the tag is set /////////// // Usage.cs public class Usage : MonoBehaviour {    void Start {        if (gameObject.HasTag(Tag.Player), gameObject.HasTag(Tag.UI)) {            Debug.Log("I have the player and the UI tag!") }    } } ////////// // Tags.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using Sirenix.OdinInspector; public enum Tag { Deafult, Player, NonPlayer, UI, Enemy } public class Tags : MonoBehaviour { [SerializeField, ShowInInspector] public Tag[] TagList = new Tag[0]; } public static class TagsExtensions {    public static bool HasTag(this GameObject obj, Tag tagToCheck) {        Tags comp = obj.GetComponent; if (comp != null) {            for (int i = 0; i < comp.TagList.Length; i++) { if(comp.TagList[i] == tagToCheck) {                    return true; }            }         }         return false; } }