Search Results for

    Show / Hide Table of Contents

    Class ParticleEffect

    The particle system instance that plays the particles simulation in the game.

    Inheritance
    System.Object
    Object
    SceneObject
    Actor
    ParticleEffect
    Implements
    ISerializable
    Inherited Members
    Actor.SetLayerRecursive(Int32)
    Actor.SetLayerNameRecursive(String)
    Actor.HasTag()
    Actor.HasTag(Tag)
    Actor.HasTag(String)
    Actor.AddTag(Tag)
    Actor.AddTagRecursive(Tag)
    Actor.RemoveTag(Tag)
    Actor.SetParent(Actor, Boolean, Boolean)
    Actor.GetChild(Int32)
    Actor.GetChild(String)
    Actor.GetChild(Type)
    Actor.GetChildren(Type)
    Actor.DestroyChildren(Single)
    Actor.GetScript(Int32)
    Actor.GetScript(Type)
    Actor.GetScripts(Type)
    Actor.AddMovement(Vector3)
    Actor.AddMovement(Vector3, Quaternion)
    Actor.GetWorldToLocalMatrix(Matrix)
    Actor.GetLocalToWorldMatrix(Matrix)
    Actor.OnDebugDraw()
    Actor.OnDebugDrawSelected()
    Actor.GetPrefabRoot()
    Actor.FindActor(String)
    Actor.FindActor(Type, Boolean)
    Actor.FindActor(Type, String)
    Actor.FindActor(Type, Tag, Boolean)
    Actor.FindScript(Type)
    Actor.HasActorInHierarchy(Actor)
    Actor.HasActorInChildren(Actor)
    Actor.IntersectsItself(Ray, Single, Vector3)
    Actor.Intersects(Ray, Single, Vector3)
    Actor.LookAt(Vector3)
    Actor.LookAt(Vector3, Vector3)
    Actor.LookingAt(Vector3)
    Actor.LookingAt(Vector3, Vector3)
    Actor.ToBytes(Actor[])
    Actor.FromBytes(Byte[])
    Actor.FromBytes(Byte[], Dictionary<Guid, Guid>)
    Actor.TryGetSerializedObjectsIds(Byte[])
    Actor.ToJson()
    Actor.FromJson(String)
    Actor.Clone()
    Actor.OnEnable()
    Actor.OnDisable()
    Actor.OnParentChanged()
    Actor.OnTransformChanged()
    Actor.OnActiveChanged()
    Actor.OnActiveInTreeChanged()
    Actor.OnOrderInParentChanged()
    Actor.OnStaticFlagsChanged()
    Actor.OnLayerChanged()
    Actor.OnBeginPlay()
    Actor.OnEndPlay()
    Actor.AddStaticFlags(StaticFlags)
    Actor.RemoveStaticFlags(StaticFlags)
    Actor.SetStaticFlag(StaticFlags, Boolean)
    Actor.HasStaticFlag(StaticFlags)
    Actor.ResetLocalTransform()
    Actor.AddChild(Type)
    Actor.AddChild<T>()
    Actor.GetChild<T>()
    Actor.TryGetChild<T>(T)
    Actor.GetOrAddChild<T>()
    Actor.AddScript(Type)
    Actor.AddScript<T>()
    Actor.GetScript<T>()
    Actor.TryGetScript<T>(T)
    Actor.FindScript<T>()
    Actor.FindActor<T>(Boolean)
    Actor.FindActor<T>(String)
    Actor.FindActor<T>(Tag, Boolean)
    Actor.GetChildren<T>()
    Actor.GetScripts<T>()
    Actor.RotateAround(Vector3, Vector3, Single, Boolean)
    Actor.ToString()
    Actor.Children
    Actor.Tags
    Actor.Layer
    Actor.Name
    Actor.IsActive
    Actor.StaticFlags
    Actor.PerInstanceRandom
    Actor.LocalPosition
    Actor.LocalOrientation
    Actor.LocalScale
    Actor.Sphere
    Actor.Box
    Actor.BoxWithChildren
    Actor.EditorBox
    Actor.EditorBoxChildren
    Actor.HasContentLoaded
    Actor.IsPrefabRoot
    Actor.IsStatic
    Actor.IsTransformStatic
    Actor.WorldToLocalMatrix
    Actor.LocalToWorldMatrix
    SceneObject.SetParent(Actor, Boolean)
    SceneObject.LinkPrefab(Guid, Guid)
    SceneObject.BreakPrefabLink()
    SceneObject.GetNamePath(Char)
    SceneObject.IsDuringPlay
    SceneObject.HasParent
    SceneObject.HasPrefabLink
    SceneObject.PrefabID
    SceneObject.PrefabObjectID
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [ActorContextMenu("New/Visuals/Particle Effect")]
    [ActorToolbox("Visuals")]
    [Unmanaged]
    public class ParticleEffect : Actor, ISerializable

    Constructors

    ParticleEffect()

    Initializes a new instance of the ParticleEffect.

    Declaration
    public ParticleEffect()

    Properties

    DrawModes

    The draw passes to use for rendering this object.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(75)]
    [Unmanaged]
    public DrawPass DrawModes { get; set; }
    Property Value
    DrawPass

    FixedTimestep

    The fixed timestep for simulation updates. Used only if UpdateMode is set to FixedTimestep.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(20)]
    [VisibleIf("IsFixedTimestep", false)]
    [Unmanaged]
    public float FixedTimestep { get; set; }
    Property Value
    System.Single

    IsLooping

    Determines whether the particle effect should loop when it finishes playing.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(50)]
    [Unmanaged]
    public bool IsLooping { get; set; }
    Property Value
    System.Boolean

    Parameters

    Gets the effect parameters collection. Those parameters are instanced from the ParticleSystem that contains a linear list of emitters and every emitter has a list of own parameters.

    Declaration
    [Unmanaged]
    public ParticleEffectParameter[] Parameters { get; }
    Property Value
    ParticleEffectParameter[]

    ParametersVersion

    Gets the effect parameters collection version number. It can be used to track parameters changes that occur when particle system or one of the emitters gets reloaded/edited.

    Declaration
    [Unmanaged]
    public uint ParametersVersion { get; }
    Property Value
    System.UInt32

    ParticlesCount

    Gets the particles count (total). GPU particles count is read with one frame delay (due to GPU execution).

    Declaration
    [Unmanaged]
    public int ParticlesCount { get; }
    Property Value
    System.Int32

    ParticleSystem

    The particle system to play.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(0)]
    [Unmanaged]
    public ParticleSystem ParticleSystem { get; set; }
    Property Value
    ParticleSystem

    PlayOnStart

    Determines whether the particle effect should play on start.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(60)]
    [Unmanaged]
    public bool PlayOnStart { get; set; }
    Property Value
    System.Boolean

    SimulationSpeed

    The particles simulation speed factor. Scales the particle system update delta time. Can be used to speed up or slow down the particles.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(30)]
    [Unmanaged]
    public float SimulationSpeed { get; set; }
    Property Value
    System.Single

    SortOrder

    The object sort order key used when sorting drawable objects during rendering. Use lower values to draw object before others, higher values are rendered later (on top). Can be used to control transparency drawing.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(80)]
    [Unmanaged]
    public sbyte SortOrder { get; set; }
    Property Value
    System.SByte

    UpdateMode

    The particles simulation update mode. Defines how to update particles emitter.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(10)]
    [Unmanaged]
    public ParticleEffect.SimulationUpdateMode UpdateMode { get; set; }
    Property Value
    ParticleEffect.SimulationUpdateMode

    UpdateWhenOffscreen

    If true, the particle simulation will be updated even when an actor cannot be seen by any camera. Otherwise, the simulation will stop running when the actor is off-screen.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(70)]
    [Unmanaged]
    public bool UpdateWhenOffscreen { get; set; }
    Property Value
    System.Boolean

    UseTimeScale

    Determines whether the particle effect should take into account the global game time scale for simulation updates.

    Declaration
    [EditorDisplay("Particle Effect", null)]
    [EditorOrder(40)]
    [Unmanaged]
    public bool UseTimeScale { get; set; }
    Property Value
    System.Boolean

    Methods

    GetParameter(String, Guid)

    Gets the particle parameter.

    Declaration
    [Unmanaged]
    public ParticleEffectParameter GetParameter(string emitterTrackName, Guid paramId)
    Parameters
    System.String emitterTrackName

    The emitter track name (in particle system asset).

    System.Guid paramId

    The emitter parameter ID (in particle emitter asset).

    Returns
    ParticleEffectParameter

    The effect parameter or null if failed to find.

    GetParameter(String, String)

    Gets the particle parameter.

    Declaration
    [Unmanaged]
    public ParticleEffectParameter GetParameter(string emitterTrackName, string paramName)
    Parameters
    System.String emitterTrackName

    The emitter track name (in particle system asset).

    System.String paramName

    The emitter parameter name (in particle emitter asset).

    Returns
    ParticleEffectParameter

    The effect parameter or null if failed to find.

    GetParameterValue(String, String)

    Gets the particle parameter value.

    Declaration
    [Unmanaged]
    public object GetParameterValue(string emitterTrackName, string paramName)
    Parameters
    System.String emitterTrackName

    The emitter track name (in particle system asset).

    System.String paramName

    The emitter parameter name (in particle emitter asset).

    Returns
    System.Object

    The value.

    Pause()

    Pauses the simulation.

    Declaration
    [Unmanaged]
    public void Pause()

    Play()

    Plays the simulation.

    Declaration
    [Unmanaged]
    public void Play()

    ResetParameters()

    Resets the particle system parameters to the default values from asset.

    Declaration
    [Unmanaged]
    public void ResetParameters()

    ResetSimulation()

    Resets the particles simulation state (clears the instance state data but preserves the instance parameters values).

    Declaration
    [Unmanaged]
    public void ResetSimulation()

    SetParameterValue(String, String, Object)

    Set the particle parameter value.

    Declaration
    [Unmanaged]
    public void SetParameterValue(string emitterTrackName, string paramName, object value)
    Parameters
    System.String emitterTrackName

    The emitter track name (in particle system asset).

    System.String paramName

    The emitter parameter name (in particle emitter asset).

    System.Object value

    The value to set.

    SpawnParticles(Int32, String)

    Manually spawns additional particles into the simulation.

    Declaration
    [Unmanaged]
    public void SpawnParticles(int count, string emitterTrackName = null)
    Parameters
    System.Int32 count

    Amount of particles to spawn.

    System.String emitterTrackName

    Name of the emitter track to spawn particles in. Empty if spawn particles into all tracks.

    Stop()

    Stops and resets the simulation.

    Declaration
    [Unmanaged]
    public void Stop()

    UpdateSimulation(Boolean)

    Performs the full particles simulation update (postponed for the next particle manager update).

    Declaration
    [Unmanaged]
    public void UpdateSimulation(bool singleFrame = false)
    Parameters
    System.Boolean singleFrame

    True if update animation by a single frame only (time time since last engine update), otherwise will update simulation with delta time since last update.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat