Restore Actor.Tag property as deprecated for backwards compatibility
Regression from a570d6d178
This commit is contained in:
@@ -471,6 +471,21 @@ bool Actor::HasTag(const StringView& tag) const
|
|||||||
return Tags.Contains(tag);
|
return Tags.Contains(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
|
const String& Actor::GetTag() const
|
||||||
|
{
|
||||||
|
return Tags.Count() != 0 ? Tags[0].ToString() : String::Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Actor::SetTag(const StringView& value)
|
||||||
|
{
|
||||||
|
const Tag tag = Tags::Get(value);
|
||||||
|
Tags.Set(&tag, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
void Actor::SetLayer(int32 layerIndex)
|
void Actor::SetLayer(int32 layerIndex)
|
||||||
{
|
{
|
||||||
layerIndex = Math::Clamp(layerIndex, 0, 31);
|
layerIndex = Math::Clamp(layerIndex, 0, 31);
|
||||||
|
|||||||
@@ -130,6 +130,19 @@ public:
|
|||||||
/// <param name="tag">The tag to check.</param>
|
/// <param name="tag">The tag to check.</param>
|
||||||
API_FUNCTION() bool HasTag(const StringView& tag) const;
|
API_FUNCTION() bool HasTag(const StringView& tag) const;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name of the tag.
|
||||||
|
/// [Deprecated in v1.5]
|
||||||
|
/// </summary>
|
||||||
|
API_PROPERTY(Attributes="HideInEditor, NoSerialize, NoAnimate")
|
||||||
|
DEPRECATED const String& GetTag() const;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the name of the tag.
|
||||||
|
/// [Deprecated in v1.5]
|
||||||
|
/// </summary>
|
||||||
|
API_PROPERTY() DEPRECATED void SetTag(const StringView& value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the actor name.
|
/// Gets the actor name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user