Implement tags recursive addition
This commit is contained in:
@@ -489,6 +489,13 @@ void Actor::AddTag(const Tag& tag)
|
|||||||
Tags.AddUnique(tag);
|
Tags.AddUnique(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Actor::AddTagRecursive(const Tag& tag)
|
||||||
|
{
|
||||||
|
for (const auto& child : Children)
|
||||||
|
child->AddTagRecursive(tag);
|
||||||
|
Tags.AddUnique(tag);
|
||||||
|
}
|
||||||
|
|
||||||
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
const String& Actor::GetTag() const
|
const String& Actor::GetTag() const
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ public:
|
|||||||
API_PROPERTY() void SetLayerName(const StringView& value);
|
API_PROPERTY() void SetLayerName(const StringView& value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the name of the layer recursively for all underlying children.
|
/// Sets the name of the layer recursively for actor and for all underlying child actors.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FUNCTION() void SetLayerNameRecursive(const StringView& value);
|
API_FUNCTION() void SetLayerNameRecursive(const StringView& value);
|
||||||
|
|
||||||
@@ -147,6 +147,12 @@ public:
|
|||||||
/// <param name="tag">The tag to add.</param>
|
/// <param name="tag">The tag to add.</param>
|
||||||
API_FUNCTION() void AddTag(const Tag& tag);
|
API_FUNCTION() void AddTag(const Tag& tag);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a tag to the actor and for all underlying child actors.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tag">The tag to add.</param>
|
||||||
|
API_FUNCTION() void AddTagRecursive(const Tag& tag);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the name of the tag.
|
/// Gets the name of the tag.
|
||||||
/// [Deprecated in v1.5]
|
/// [Deprecated in v1.5]
|
||||||
|
|||||||
Reference in New Issue
Block a user