Merge branch 'Tryibion-prefab-debug-draw'
This commit is contained in:
@@ -623,6 +623,14 @@ namespace FlaxEditor.Viewport
|
|||||||
DebugDraw.DrawActors(new IntPtr(actors), _debugDrawData.ActorsCount, false);
|
DebugDraw.DrawActors(new IntPtr(actors), _debugDrawData.ActorsCount, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Debug draw all actors in prefab
|
||||||
|
foreach (var child in SceneGraphRoot.ChildNodes)
|
||||||
|
{
|
||||||
|
if (child is not ActorNode actorNode)
|
||||||
|
continue;
|
||||||
|
DebugDraw.DrawActorsTree(actorNode.Actor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -944,6 +944,12 @@ void DebugDraw::DrawActors(Actor** selectedActors, int32 selectedActorsCount, bo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebugDraw::DrawActorsTree(Actor* actor)
|
||||||
|
{
|
||||||
|
Function<bool(Actor*)> function = &DrawActorsTreeWalk;
|
||||||
|
actor->TreeExecute(function);
|
||||||
|
}
|
||||||
|
|
||||||
void DebugDraw::DrawAxisFromDirection(const Vector3& origin, const Vector3& direction, float size, float duration, bool depthTest)
|
void DebugDraw::DrawAxisFromDirection(const Vector3& origin, const Vector3& direction, float size, float duration, bool depthTest)
|
||||||
{
|
{
|
||||||
ASSERT(direction.IsNormalized());
|
ASSERT(direction.IsNormalized());
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
|
|||||||
/// <param name="drawScenes">True if draw all debug shapes from scenes too or false if draw just from specified actor list.</param>
|
/// <param name="drawScenes">True if draw all debug shapes from scenes too or false if draw just from specified actor list.</param>
|
||||||
API_FUNCTION() static void DrawActors(Actor** selectedActors, int32 selectedActorsCount, bool drawScenes);
|
API_FUNCTION() static void DrawActors(Actor** selectedActors, int32 selectedActorsCount, bool drawScenes);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Draws the debug shapes for the given actor and the actor's children
|
||||||
|
/// </summary>
|
||||||
|
/// /// <param name="actor">The actor to start drawing at.</param>
|
||||||
|
API_FUNCTION() static void DrawActorsTree(Actor* actor);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Draws the lines axis from direction.
|
/// Draws the lines axis from direction.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user