diff --git a/Source/Engine/Level/Actor.cpp b/Source/Engine/Level/Actor.cpp index 2ec3231d6..1c2f1768e 100644 --- a/Source/Engine/Level/Actor.cpp +++ b/Source/Engine/Level/Actor.cpp @@ -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 diff --git a/Source/Engine/Level/Actor.h b/Source/Engine/Level/Actor.h index 2888b7d49..c1d038783 100644 --- a/Source/Engine/Level/Actor.h +++ b/Source/Engine/Level/Actor.h @@ -130,6 +130,12 @@ public: /// The tag to check. API_FUNCTION() bool HasTag(const StringView& tag) const; + /// + /// Adds a tag to the actor + /// + /// The tag to add. + API_FUNCTION() void AddTag(const Tag& tag); + /// /// Gets the name of the tag. /// [Deprecated in v1.5]