Search Results for

    Show / Hide Table of Contents

    Class ParticleSystem

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

    Inheritance
    Object
    ScriptingObject
    ManagedScriptingObject
    Asset
    BinaryAsset
    ParticleSystem
    Inherited Members
    Asset::_deleteFileOnUnload
    BinaryAsset::_dependantAssets
    ScriptingObject::_gcHandle
    BinaryAsset::_header
    ScriptingObject::_id
    BinaryAsset::_isSaving
    Asset::_isVirtual
    Asset::_loadingTask
    Asset::_loadState
    Asset::_refCount
    BinaryAsset::_storageRef
    ScriptingObject::_type
    BinaryAsset::AddDependency(BinaryAsset* asset)
    Asset::AddReference()
    Asset::Asset(const SpawnParams& params, const AssetInfo* info)
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    Asset::CancelStreaming()
    ScriptingObject::Cast(ScriptingObject* obj)
    Asset::ChangeID(const Guid& newId)
    BinaryAsset::ClearDependencies()
    Asset::const
    BinaryAsset::createLoadingTask()
    Asset::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    Asset::DECLARE_ENUM_7(LoadResult, Ok, Failed, MissingDataChunk, CannotLoadData, CannotLoadStorage, CannotLoadInitData, InvalidData)
    ScriptingObject::Deleted
    Asset::DeleteManaged()
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    BinaryAsset::Dependencies
    Asset::DEPRECATED("Use GetReferences with assets and files parameter instead")
    Asset::DestroyManaged()
    ParticleSystem
    ParticleSystem
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    BinaryAsset::GetChunk(int32 index)
    BinaryAsset::GetChunkData(int32 index, BytesContainer& data)
    BinaryAsset::GetChunkSize(int32 index)
    ScriptingObject::GetClass()
    ScriptingObject::GetID()
    BinaryAsset::GetImportMetadata(String& path, String& username)
    BinaryAsset::GetImportPath()
    ScriptingObject::GetManagedInstance()
    BinaryAsset::GetMemoryUsage()
    BinaryAsset::GetOrCreateChunk(int32 index)
    ScriptingObject::GetOrCreateManagedInstance()
    BinaryAsset::GetPath()
    Asset::GetReferences(Array<Guid, HeapAllocation>& assets, Array<String, HeapAllocation>& files)
    Asset::GetReferences()
    Asset::GetReferencesCount()
    BinaryAsset::GetSerializedVersion()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Asset::GetTypeName()
    BinaryAsset::HasChunk(int32 index)
    BinaryAsset::HasChunkLoaded(int32 index)
    BinaryAsset::HasDependenciesModified()
    ScriptingObject::HasManagedInstance()
    BinaryAsset::init(AssetInitData& initData)
    BinaryAsset::Init(const FlaxStorageReference& storage, AssetHeader& header)
    BinaryAsset::Init(AssetInitData& initData)
    BinaryAsset::InitVirtual(AssetInitData& initData)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Asset::IsInternalType()
    Asset::IsLoaded()
    ScriptingObject::IsRegistered()
    Asset::IsVirtual()
    Asset::LastLoadFailed()
    BinaryAsset::loadAsset()
    BinaryAsset::LoadChunk(int32 chunkIndex)
    BinaryAsset::LoadChunks(AssetChunksFlag chunks)
    ParticleSystem
    Asset::Locker
    ManagedScriptingObject::ManagedScriptingObject(const SpawnParams& params)
    BinaryAsset::Metadata
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    Asset::OnCheckSave(const StringView& path=StringView::Empty)
    BinaryAsset::OnDeleteObject()
    BinaryAsset::OnDependencyModified(BinaryAsset* asset)
    Asset::onLoad(LoadAssetTask* task)
    Asset::OnLoaded
    Asset::onLoaded()
    Asset::onLoaded_MainThread()
    Asset::OnManagedInstanceDeleted()
    Asset::OnReloading
    BinaryAsset::onRename(const StringView& newPath)
    Asset::OnScriptingDispose()
    Asset::onUnload_MainThread()
    Asset::OnUnloaded
    ScriptingObject::RegisterObject()
    BinaryAsset::Reimport()
    BinaryAsset::ReleaseChunk(int32 index)
    BinaryAsset::ReleaseChunks()
    BinaryAsset::releaseStorage()
    Asset::Reload()
    Asset::RemoveReference()
    BinaryAsset::RequestChunkDataAsync(int32 index)
    BinaryAsset::SaveAsset(AssetInitData& data, bool silentMode=false)
    BinaryAsset::SaveAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    BinaryAsset::SaveToAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    BinaryAsset::SetChunk(int32 index, const Span<byte>& data)
    ManagedScriptingObject::SetManagedInstance(MObject* instance)
    Asset::ShouldDeleteFileOnUnload()
    ParticleSystem
    Asset::startLoading()
    BinaryAsset::Storage
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Asset::ToString()
    ScriptingObject::UnregisterObject()
    Asset::WaitForLoaded(double timeoutInMilliseconds=30000.0)
    BinaryAsset::~BinaryAsset()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Particles/ParticleSystem.h
    Syntax
    public class ParticleSystem : public BinaryAsset

    Fields

    DurationFrames

    The animation duration (in frames).

    Declaration
    public int32 DurationFrames
    Field Value
    int32

    Emitters

    The emitters used by this system.

    Declaration
    public Array<AssetReference<ParticleEmitter>> Emitters
    Field Value
    Array<AssetReference<ParticleEmitter>>

    EmittersParametersOverrides

    The overriden values for the emitters parameters. Key is pair of emitter index and parameter ID, value is the custom value.

    Declaration
    public Dictionary<EmitterParameterOverrideKey, Variant> EmittersParametersOverrides
    Field Value
    Dictionary<EmitterParameterOverrideKey, Variant>

    FramesPerSecond

    The frames amount per second of the timeline animation.

    Declaration
    public float FramesPerSecond
    Field Value
    float

    Tracks

    The tracks on the system timeline.

    Declaration
    public Array<Track> Tracks
    Field Value
    Array<Track>

    Version

    The asset data version number. Used to sync the data with the instances state. Incremented each time asset gets loaded.

    Declaration
    public uint32 Version = 0
    Field Value
    uint32

    Methods

    getChunksToPreload()

    Gets packed chunks indices to preload before asset loading action

    Declaration
    protected virtual AssetChunksFlag getChunksToPreload() const override
    Returns
    AssetChunksFlag

    Chunks to load flags

    Overrides
    BinaryAsset::getChunksToPreload()

    GetDuration()

    The animation duration (in seconds).

    Declaration
    public float GetDuration() const
    Returns
    float

    GetReferences(Array<Guid>& assets, Array<String>& files)

    Declaration
    public void GetReferences(Array<Guid>& assets, Array<String>& files) const override
    Parameters
    Array<Guid> assets

    Array<String> files

    Init(ParticleEmitter* emitter, float duration, float fps=60.0f)

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

    Declaration
    public void Init(ParticleEmitter* emitter, float duration, float fps=60.0f)
    Parameters
    ParticleEmitter emitter

    The emitter to playback.

    float duration

    The timeline animation duration in seconds.

    float fps

    The amount of frames per second of the timeline animation.

    InitAsVirtual()

    Initializes asset data as virtual asset.

    Declaration
    public virtual void InitAsVirtual() override
    Overrides
    Asset::InitAsVirtual()

    load()

    Load data from the chunks

    Declaration
    protected virtual LoadResult load() override
    Returns
    LoadResult

    Loading result

    Overrides
    BinaryAsset::load()

    LoadTimeline()

    Loads the serialized timeline data.

    Declaration
    public BytesContainer LoadTimeline() const
    Returns
    BytesContainer

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

    Save(const StringView& path=StringView::Empty)

    Saves this asset to the file. Supported only in Editor.

    Declaration
    public virtual bool Save(const StringView& path=StringView::Empty) override
    Parameters
    StringView path

    The custom asset path to use for the saving. Use empty value to save this asset to its own storage location. Can be used to duplicate asset. Must be specified when saving virtual asset.

    Returns
    bool

    True when cannot save data, otherwise false.

    Overrides
    Asset::Save(const StringView& path=StringView::Empty)

    SaveTimeline(const BytesContainer& data)

    Saves the serialized timeline data to the asset.

    Declaration
    public bool SaveTimeline(const BytesContainer& data) const
    Parameters
    BytesContainer data

    The timeline data container.

    Returns
    bool

    true failed to save data; otherwise, false.

    Spawn(Actor* parent, const Transform& transform, bool autoDestroy=false)

    Spawns the particles at the given location.

    Declaration
    public ParticleEffect* Spawn(Actor* parent, const 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.

    bool autoDestroy

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

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(Actor* parent, const Vector3& position, bool autoDestroy=false)

    Spawns the particles at the given location.

    Declaration
    public ParticleEffect* Spawn(Actor* parent, const 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.

    bool autoDestroy

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

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(Actor* parent, Vector3 position, Quaternion rotation, bool autoDestroy=false)

    Spawns the particles at the given location.

    Declaration
    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.

    bool autoDestroy

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

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(const Transform& transform, bool autoDestroy=false)

    Spawns the particles at the given location.

    Declaration
    public ParticleEffect* Spawn(const Transform& transform, bool autoDestroy=false)
    Parameters
    Transform transform

    The spawn transform.

    bool autoDestroy

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

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(const Vector3& position, bool autoDestroy=false)

    Spawns the particles at the given location.

    Declaration
    public ParticleEffect* Spawn(const Vector3& position, bool autoDestroy=false)
    Parameters
    Vector3 position

    The spawn position.

    bool autoDestroy

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

    Returns
    ParticleEffect

    The spawned effect.

    Spawn(const Vector3& position, const Quaternion& rotation, bool autoDestroy=false)

    Spawns the particles at the given location.

    Declaration
    public ParticleEffect* Spawn(const Vector3& position, const Quaternion& rotation, bool autoDestroy=false)
    Parameters
    Vector3 position

    The spawn position.

    Quaternion rotation

    The spawn rotation.

    bool autoDestroy

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

    Returns
    ParticleEffect

    The spawned effect.

    unload(bool isReloading)

    Unloads asset data

    Declaration
    protected virtual void unload(bool isReloading) override
    Parameters
    bool isReloading

    True if asset is reloading data, otherwise false.

    Overrides
    Asset::unload(bool isReloading)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat