Class ParticleSystemPreview
Particle System asset preview editor viewport.
Inheritance
Implements
Namespace: FlaxEditor.Viewport.Previews
Assembly: FlaxEngine.CSharp.dll
Syntax
public class ParticleSystemPreview : AssetPreview, IComparable, IDrawable, IEditorPrimitivesOwner
Constructors
ParticleSystemPreview(Boolean)
Initializes a new instance of the ParticleSystemPreview class.
Declaration
public ParticleSystemPreview(bool useWidgets)
Parameters
System.Boolean
useWidgets
if set to |
Properties
HasLoadedAssets
Gets a value indicating whether this viewport has loaded dependant assets.
Declaration
public override bool HasLoadedAssets { get; }
Property Value
System.Boolean
|
Overrides
PlaySimulation
Gets or sets a value indicating whether to play the particles simulation in editor.
Declaration
public bool PlaySimulation { get; set; }
Property Value
System.Boolean
|
PreviewActor
Gets the particle effect actor used to preview selected asset.
Declaration
public ParticleEffect PreviewActor { get; }
Property Value
ParticleEffect
|
ShowBounds
Gets or sets a value indicating whether to show particle effect bounding box.
Declaration
public bool ShowBounds { get; set; }
Property Value
System.Boolean
|
ShowOrigin
Gets or sets a value indicating whether to show particle effect origin point.
Declaration
public bool ShowOrigin { get; set; }
Property Value
System.Boolean
|
ShowParticlesCounter
Gets or sets a value indicating whether to show spawned particles counter (for CPU particles only).
Declaration
public bool ShowParticlesCounter { get; set; }
Property Value
System.Boolean
|
System
Gets or sets the particle system asset to preview.
Declaration
public ParticleSystem System { get; set; }
Property Value
ParticleSystem
|
Methods
Draw()
FitIntoView(Single)
Fits the particle system into view (scales the emitter based on the current bounds of the system).
Declaration
public void FitIntoView(float targetSize = 300F)
Parameters
System.Single
targetSize
The target size of the effect. |
OnDestroy()
OnKeyDown(KeyboardKeys)
When key goes down
Declaration
public override bool OnKeyDown(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key value |
Returns
System.Boolean
True if event has been handled, otherwise false |
Overrides
Update(Single)
Perform control update and all its children
Declaration
public override void Update(float deltaTime)
Parameters
System.Single
deltaTime
Delta time in seconds |
Overrides
Events
PlaySimulationChanged
Occurs when particles simulation playback state gets changed.
Declaration
public event Action PlaySimulationChanged
Event Type
System.Action
|