Merge remote-tracking branch 'origin/master' into sdl_platform

This commit is contained in:
2025-08-12 15:22:34 +03:00
28 changed files with 533 additions and 195 deletions

View File

@@ -374,14 +374,7 @@ namespace FlaxEditor.Viewport
// Draw selected objects debug shapes and visuals
if (DrawDebugDraw && (renderContext.View.Flags & ViewFlags.DebugDraw) == ViewFlags.DebugDraw)
{
unsafe
{
fixed (IntPtr* actors = _debugDrawData.ActorsPtrs)
{
DebugDraw.DrawActors(new IntPtr(actors), _debugDrawData.ActorsCount, true);
}
}
_debugDrawData.DrawActors(true);
DebugDraw.Draw(ref renderContext, target.View(), targetDepth.View(), true);
}
}

View File

@@ -643,14 +643,7 @@ namespace FlaxEditor.Viewport
if (selectedParents[i].IsActiveInHierarchy)
selectedParents[i].OnDebugDraw(_debugDrawData);
}
unsafe
{
fixed (IntPtr* actors = _debugDrawData.ActorsPtrs)
{
DebugDraw.DrawActors(new IntPtr(actors), _debugDrawData.ActorsCount, false);
}
}
_debugDrawData.DrawActors();
// Debug draw all actors in prefab and collect actors
var view = Task.View;

View File

@@ -246,6 +246,14 @@ namespace FlaxEditor.Viewport.Previews
}
}
/// <inheritdoc />
protected override void OnDebugDraw(GPUContext context, ref RenderContext renderContext)
{
base.OnDebugDraw(context, ref renderContext);
_previewEffect.OnDebugDraw();
}
/// <inheritdoc />
public override void Draw()
{
@@ -295,7 +303,8 @@ namespace FlaxEditor.Viewport.Previews
/// <inheritdoc />
public override void OnDestroy()
{
// Cleanup objects
if (IsDisposing)
return;
_previewEffect.ParticleSystem = null;
Object.Destroy(ref _previewEffect);
Object.Destroy(ref _boundsModel);