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

View File

@@ -127,6 +127,8 @@ namespace FlaxEditor.Windows.Assets
PlaySimulation = true,
Parent = _split2.Panel1
};
_preview.PreviewActor.ShowDebugDraw = true;
_preview.ShowDebugDraw = true;
// Asset properties proxy
_properties = new PropertiesProxy();