Fix duplicated Debug Draw inoke for actors

This commit is contained in:
Wojtek Figat
2021-05-15 12:53:54 +02:00
parent 46b1fd944e
commit cc8e098183
2 changed files with 2 additions and 8 deletions

View File

@@ -1248,12 +1248,6 @@ void Actor::OnDebugDraw()
for (auto* script : Scripts)
if (script->GetEnabled())
script->OnDebugDraw();
for (auto& child : Children)
{
if (child->GetIsActive())
child->OnDebugDraw();
}
}
void Actor::OnDebugDrawSelected()

View File

@@ -665,12 +665,12 @@ public:
#if USE_EDITOR
/// <summary>
/// Draws debug shapes for the actor and all child actors.
/// Draws debug shapes for the actor and all child scripts.
/// </summary>
virtual void OnDebugDraw();
/// <summary>
/// Draws debug shapes for the selected actor and all child actors.
/// Draws debug shapes for the selected actor and all child scripts.
/// </summary>
virtual void OnDebugDrawSelected();