Add option for debug shapes drawing for particle emitters

#3267
This commit is contained in:
Wojtek Figat
2025-07-11 23:00:41 +02:00
parent 0bc595f16f
commit 3e82e550f3
9 changed files with 187 additions and 3 deletions

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);