namespace Zinnia.Rule { using UnityEngine; using Zinnia.Data.Collection.List; /// /// Determines whether a 's is part of a list. /// public class AnyTagRule : GameObjectRule { [Tooltip("The tags to check against.")] [SerializeField] private StringObservableList tags; /// /// The tags to check against. /// public StringObservableList Tags { get { return tags; } set { tags = value; } } /// protected override bool Accepts(GameObject targetGameObject) { if (Tags == null) { return false; } foreach (string testedTag in Tags.NonSubscribableElements) { if (targetGameObject.CompareTag(testedTag)) { return true; } } return false; } } }