Fix duplicated Debug Draw inoke for actors
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user