Add Script::IsEnabledInHierarchy

This commit is contained in:
Wojtek Figat
2025-03-27 21:05:32 +01:00
parent 38b00f458c
commit 0041a17b7d
2 changed files with 10 additions and 0 deletions

View File

@@ -63,6 +63,11 @@ void Script::SetEnabled(bool value)
}
}
bool Script::IsEnabledInHierarchy() const
{
return _enabled && (_parent == nullptr || _parent->IsActiveInHierarchy());
}
Actor* Script::GetActor() const
{
return _parent;