diff --git a/Source/Engine/Level/Level.cpp b/Source/Engine/Level/Level.cpp index b1c5ede2b..b5b841171 100644 --- a/Source/Engine/Level/Level.cpp +++ b/Source/Engine/Level/Level.cpp @@ -787,12 +787,12 @@ void FindActorsRecursiveByParentTags(Actor* node, const Array& tags, Array< { for (Tag tag : tags) { - if (node->HasTag(tag)) { + if (node->HasTag(tag)) + { result.Add(node); break; } } - for (Actor* child : node->Children) FindActorsRecursiveByParentTags(child, tags, result); } @@ -836,7 +836,7 @@ Array Level::FindActors(const Tag& tag, Actor* root) return result; } -API_FUNCTION()Array Level::FindActorsByParentTag(const Tag& parentTag, Actor* root) +Array Level::FindActorsByParentTag(const Tag& parentTag, Actor* root) { PROFILE_CPU(); Array result; @@ -846,7 +846,6 @@ API_FUNCTION()Array Level::FindActorsByParentTag(const Tag& parentTag, A { return result; } - if (subTags.Count() == 1) { result = FindActors(subTags[0], root); diff --git a/Source/Engine/Level/Level.h b/Source/Engine/Level/Level.h index 203930bac..0ad52c40c 100644 --- a/Source/Engine/Level/Level.h +++ b/Source/Engine/Level/Level.h @@ -397,7 +397,6 @@ public: /// Found actors list. API_FUNCTION() static Array GetActors(API_PARAM(Attributes="TypeReference(typeof(Actor))") const MClass* type); - /// /// Finds all the scripts of the given type in all the loaded scenes. ///