From 5b5c298a960a7d096af06ef512ec56d406dfa4ce Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Fri, 1 Sep 2023 06:35:52 -0500 Subject: [PATCH] Add remove tag method to actor. --- Source/Engine/Level/Actor.cpp | 5 +++++ Source/Engine/Level/Actor.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/Source/Engine/Level/Actor.cpp b/Source/Engine/Level/Actor.cpp index 8185f3b9d..a9d136b30 100644 --- a/Source/Engine/Level/Actor.cpp +++ b/Source/Engine/Level/Actor.cpp @@ -476,6 +476,11 @@ void Actor::AddTag(const Tag& tag) Tags.AddUnique(tag); } +void Actor::RemoveTag(const Tag& tag) +{ + Tags.Remove(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 510bc9eb8..8643dba05 100644 --- a/Source/Engine/Level/Actor.h +++ b/Source/Engine/Level/Actor.h @@ -136,6 +136,12 @@ public: /// The tag to add. API_FUNCTION() void AddTag(const Tag& tag); + /// + /// Removes a tag to the actor + /// + /// The tag to remove. + API_FUNCTION() void RemoveTag(const Tag& tag); + /// /// Gets the name of the tag. /// [Deprecated in v1.5]