Skip to content

ParticleSystem ​

1つのEmitterとPhase列を持つParticleをCPUまたはGPUで実行します。

使い方と前提条件 · C# API一覧

型の情報 ​

Clear ​

csharp
public void Clear(bool withChildren = true)

発生済みの粒子を消去します。ParticleSystemの設定やGameObjectを削除する操作ではありません。

引数型既定値
withChildrenboolTrue

Enabled ​

csharp
public bool Enabled

このComponentの処理を有効にします。GameObject全体のアクティブ状態とは別です。

操作:読取・変更。

対応するInspector:ParticleSystem。

FromEntity ​

csharp
public static ParticleSystem FromEntity(GameObject gameObject)

既にComponentを持つGameObjectから操作用の参照を作ります。Componentを追加する操作ではありません。

引数型既定値
gameObjectNEMEngine.GameObject必須

戻り値:NEMEngine.ParticleSystem。

GetSettings ​

csharp
public ParticleSystemSettings GetSettings()

Emitter・Phase・Module・Trail・GPU設定を持つ編集用Snapshotを取得します。変更後はSetSettingsへ戻します。

戻り値:NEMEngine.ParticleSystemSettings。

IsAlive ​

csharp
public bool IsAlive(bool withChildren = true)

発生や生存粒子が残っているかを調べます。isPlayingと異なり、停止後に残った粒子を含む終了判定へ使います。

引数型既定値
withChildrenboolTrue

戻り値:bool。

Layer ​

csharp
public int Layer

描画するLayer番号です。

操作:読取・変更。

対応するInspector:ParticleSystem。

Order ​

csharp
public int Order

同じLayer内の並び順です。

操作:読取・変更。

対応するInspector:ParticleSystem。

Pause ​

csharp
public void Pause(bool withChildren = true)

粒子の再生状態を保持して一時停止します。消去とは異なり、Playで続きの再生へ戻せます。

引数型既定値
withChildrenboolTrue

Play ​

csharp
public void Play(bool withChildren = true)

再生を開始または再開します。withChildrenで子のParticleSystemにも操作を伝えるかを選びます。

引数型既定値
withChildrenboolTrue

PlayOnAwake ​

csharp
public bool PlayOnAwake

自動再生するかを指定するboolプロパティです。system.PlayOnAwake = true; と代入します。今再生する関数はPlay()で、このプロパティを関数として呼び出しません。

操作:読取・変更。

対応するInspector:ParticleSystem。

PlayOneShot ​

csharp
public void PlayOneShot(bool withChildren = true)

演出を単発で再生します。繰り返す環境効果ではなく、攻撃・着弾などの一度の発生に使います。

引数型既定値
withChildrenboolTrue

PlaybackSpeed ​

csharp
public float PlaybackSpeed

再生時間に掛ける倍率です。

操作:読取・変更。

対応するInspector:ParticleSystem。

RenderingLayerMask ​

csharp
public uint RenderingLayerMask

このRendererを表示するCameraのCullingMaskと照合するbit集合です。

操作:読取・変更。

対応するInspector:ParticleSystem。

SetSettings ​

csharp
public void SetSettings(ParticleSystemSettings settings)

編集済みSnapshotをこのParticleSystemへ反映します。GetSettingsの戻り値だけを書き換えて終了しないでください。

引数型既定値
settingsNEMEngine.ParticleSystemSettings必須

SimulationSpace ​

csharp
public ParticleSystemSimulationSpace SimulationSpace

発生済み粒子をEmitterへ追従させるLocalか、Worldへ残すかを指定します。

操作:読取・変更。

対応するInspector:ParticleSystem。

SimulationTarget ​

csharp
public ParticleSimulationTarget SimulationTarget

CPUまたはGPUを選びます。使用できるModuleと追加機能が変わります。

操作:読取・変更。

対応するInspector:ParticleSystem。

Stop ​

csharp
public void Stop(bool withChildren = true, ParticleSystemStopBehavior stopBehavior = StopEmitting)

新規発生を止めます。stopBehaviorで発生済み粒子も消すかを選びます。withChildrenは子への伝播指定です。

引数型既定値
withChildrenboolTrue
stopBehaviorNEMEngine.ParticleSystemStopBehavior1

StopAction ​

csharp
public ParticleSystemStopAction StopAction

粒子がなくなった後のGameObject無効化・破棄などを指定します。

操作:読取・変更。

対応するInspector:ParticleSystem。

UseUnscaledTime ​

csharp
public bool UseUnscaledTime

TimeScaleの影響を受けない時間で進めます。

操作:読取・変更。

対応するInspector:ParticleSystem。

Visible ​

csharp
public bool Visible

通常描画に表示するかを指定します。

操作:読取・変更。

対応するInspector:ParticleSystem。

componentTypeID ​

csharp
public static int componentTypeID

組み込みComponentの接続識別子です。通常のゲームコードではGetComponentで取得します。

操作:読取専用。

droppedTrailCount ​

csharp
public int droppedTrailCount

Trailの容量上限などで保持できなかった軌跡の診断値です。

操作:読取専用。

hasValidStatistics ​

csharp
public bool hasValidStatistics

粒子数・Trail数の統計が利用可能かを示す読取専用値です。GPUの読戻し待ちと0件を区別します。

操作:読取専用。

isEmitting ​

csharp
public bool isEmitting

新しい粒子を発生させているかを取得します。

操作:読取専用。

isPaused ​

csharp
public bool isPaused

ParticleSystemが一時停止しているかを取得します。

操作:読取専用。

isPlaying ​

csharp
public bool isPlaying

ParticleSystemが再生状態かを取得します。

操作:読取専用。

isStopped ​

csharp
public bool isStopped

ParticleSystemが停止状態かを取得します。

操作:読取専用。

particleCount ​

csharp
public int particleCount

確認できる生存粒子数です。GPUではhasValidStatisticsを併せて確認します。

操作:読取専用。

randomSeed ​

csharp
public uint randomSeed

固定再生に使う乱数Seedです。

操作:読取・変更。

対応するInspector:ParticleSystem。

trailCount ​

csharp
public int trailCount

確認できるTrail数です。最大粒子数とは別の容量を使用します。

操作:読取専用。

useAutoRandomSeed ​

csharp
public bool useAutoRandomSeed

再生のたびにSeedを変えます。無効なら指定Seedで再現します。

操作:読取・変更。

対応するInspector:ParticleSystem。

実行時の扱い ​

Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。

現行版マニュアル · 8ea58ba2 · 2026-10-28確認