This commit is contained in:
Wojciech Figat
2022-11-02 16:47:06 +01:00
parent b816e2b3a9
commit 0c9001e3d1
2 changed files with 2 additions and 13 deletions

View File

@@ -509,21 +509,9 @@ void Actor::SetTag(const StringView& tagName)
void Actor::SetName(const StringView& value)
{
// Validate name
if (value.Length() == 0)
{
LOG(Warning, "Cannot change actor '{0}' name. Name cannot be empty.", ToString());
return;
}
// Check if name won't change
if (_name == value)
return;
// Set name
_name = value;
// Fire events
if (GetScene())
Level::callActorEvent(Level::ActorEventType::OnActorNameChanged, this, nullptr);
}