Search Results for

    Show / Hide Table of Contents

    Class ParticleSystem

    Particle system contains a composition of particle emitters and playback information.

    Inheritance
    System.Object
    Object
    Asset
    BinaryAsset
    ParticleSystem
    Inherited Members
    BinaryAsset.Reimport()
    BinaryAsset.ImportPath
    Asset.Reload()
    Asset.WaitForLoaded(Double)
    Asset.GetReferences()
    Asset.Save(String)
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Asset.MemoryUsage
    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
    [Unmanaged]
    public class ParticleSystem : BinaryAsset

    Constructors

    ParticleSystem()

    Initializes a new instance of the ParticleSystem.

    Declaration
    public ParticleSystem()

    Properties

    Duration

    The animation duration (in seconds).

    Declaration
    [Unmanaged]
    public float Duration { get; }
    Property Value
    System.Single

    DurationFrames

    The animation duration (in frames).

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

    FramesPerSecond

    The frames amount per second of the timeline animation.

    Declaration
    [Unmanaged]
    public float FramesPerSecond { get; }
    Property Value
    System.Single

    Methods

    Init(ParticleEmitter, Single, Single)

    Initializes the particle system that plays a single particles emitter. This can be used only for virtual assets.

    Declaration
    [Unmanaged]
    public void Init(ParticleEmitter emitter, float duration, float fps = 60F)
    Parameters
    ParticleEmitter emitter

    The emitter to playback.

    System.Single duration

    The timeline animation duration in seconds.

    System.Single fps

    The amount of frames per second of the timeline animation.

    LoadTimeline()

    Loads the serialized timeline data.

    Declaration
    [Unmanaged]
    public byte[] LoadTimeline()
    Returns
    System.Byte[]

    The output surface data, or empty if failed to load.

    SaveTimeline(Byte[])

    Saves the serialized timeline data to the asset.

    Declaration
    [Unmanaged]
    public bool SaveTimeline(byte[] data)
    Parameters
    System.Byte[] data

    The timeline data container.

    Returns
    System.Boolean

    true failed to save data; otherwise, false.

    Spawn(Actor, Transform, Boolean)

    Spawns the particles at the given location.

    Declaration
    [Unmanaged]
    public ParticleEffect Spawn(Actor parent, Transform transform, bool autoDestroy = false)
    Parameters
    Actor parent

    The parent actor (can be null to link it to the first loaded scene).

    Transform transform

    The spawn transform.

    System.Boolean autoDestroy

    If set to true effect be auto-destroyed after duration.

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(Actor, Vector3, Quaternion, Boolean)

    Spawns the particles at the given location.

    Declaration
    [Unmanaged]
    public ParticleEffect Spawn(Actor parent, Vector3 position, Quaternion rotation, bool autoDestroy = false)
    Parameters
    Actor parent

    The parent actor (can be null to link it to the first loaded scene).

    Vector3 position

    The spawn position.

    Quaternion rotation

    The spawn rotation.

    System.Boolean autoDestroy

    If set to true effect be auto-destroyed after duration.

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(Actor, Vector3, Boolean)

    Spawns the particles at the given location.

    Declaration
    [Unmanaged]
    public ParticleEffect Spawn(Actor parent, Vector3 position, bool autoDestroy = false)
    Parameters
    Actor parent

    The parent actor (can be null to link it to the first loaded scene).

    Vector3 position

    The spawn position.

    System.Boolean autoDestroy

    If set to true effect be auto-destroyed after duration.

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(Transform, Boolean)

    Spawns the particles at the given location.

    Declaration
    [Unmanaged]
    public ParticleEffect Spawn(Transform transform, bool autoDestroy = false)
    Parameters
    Transform transform

    The spawn transform.

    System.Boolean autoDestroy

    If set to true effect be auto-destroyed after duration.

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(Vector3, Quaternion, Boolean)

    Spawns the particles at the given location.

    Declaration
    [Unmanaged]
    public ParticleEffect Spawn(Vector3 position, Quaternion rotation, bool autoDestroy = false)
    Parameters
    Vector3 position

    The spawn position.

    Quaternion rotation

    The spawn rotation.

    System.Boolean autoDestroy

    If set to true effect be auto-destroyed after duration.

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(Vector3, Boolean)

    Spawns the particles at the given location.

    Declaration
    [Unmanaged]
    public ParticleEffect Spawn(Vector3 position, bool autoDestroy = false)
    Parameters
    Vector3 position

    The spawn position.

    System.Boolean autoDestroy

    If set to true effect be auto-destroyed after duration.

    Returns
    ParticleEffect

    The spawned effect.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    • Constructors
      • ParticleSystem()
    • Properties
      • Duration
      • DurationFrames
      • FramesPerSecond
    • Methods
      • Init(ParticleEmitter, Single, Single)
      • LoadTimeline()
      • SaveTimeline(Byte[])
      • Spawn(Actor, Transform, Boolean)
      • Spawn(Actor, Vector3, Quaternion, Boolean)
      • Spawn(Actor, Vector3, Boolean)
      • Spawn(Transform, Boolean)
      • Spawn(Vector3, Quaternion, Boolean)
      • Spawn(Vector3, Boolean)
    • Extension Methods
    Back to top Copyright © 2012-2024 Wojciech Figat