Add Actor.AddTag utility

This commit is contained in:
Wojtek Figat
2023-02-19 11:25:46 +01:00
parent dc04d3dc0b
commit 5a7f678e4d
2 changed files with 11 additions and 0 deletions

View File

@@ -471,6 +471,11 @@ bool Actor::HasTag(const StringView& tag) const
return Tags.Contains(tag);
}
void Actor::AddTag(const Tag& tag)
{
Tags.AddUnique(tag);
}
PRAGMA_DISABLE_DEPRECATION_WARNINGS
const String& Actor::GetTag() const

View File

@@ -130,6 +130,12 @@ public:
/// <param name="tag">The tag to check.</param>
API_FUNCTION() bool HasTag(const StringView& tag) const;
/// <summary>
/// Adds a tag to the actor
/// </summary>
/// <param name="tag">The tag to add.</param>
API_FUNCTION() void AddTag(const Tag& tag);
/// <summary>
/// Gets the name of the tag.
/// [Deprecated in v1.5]