Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

ParticleEmitter.Emit

フィードバック

ありがとうございます

この度はドキュメントの品質向上のためにご意見・ご要望をお寄せいただき、誠にありがとうございます。頂いた内容をドキュメントチームで確認し、必要に応じて修正を致します。

閉じる

送信に失敗しました

なんらかのエラーが発生したため送信が出来ませんでした。しばらく経ってから<a>もう一度送信</a>してください。ドキュメントの品質向上のために時間を割いて頂き誠にありがとうございます。

閉じる

キャンセル

マニュアルに切り替える
public function Emit(): void;
public void Emit();

説明

設定した数だけパーティクルを放出します

minEmissionmaxEmission properties で設定できるように、 エミッタはパーティクルをランダムで放出させます。


public function Emit(count: int): void;
public void Emit(int count);

パラメーター

説明

設定した数のパーティクルをすぐに放出します


public function Emit(pos: Vector3, velocity: Vector3, size: float, energy: float, color: Color): void;
public void Emit(Vector3 pos, Vector3 velocity, float size, float energy, Color color);

パラメーター

pos パーティクルのサイズ
velocity パーティクルの速度
size パーティクルのサイズ
energy 発生したパーティクルの最小寿命(秒単位)
color パーティクルのカラー

説明

パラメーターを指定して 1 つのパーティクルを放出します

var emitter: ParticleEmitter;

function Start() { emitter = GetComponent.<ParticleEmitter>(); // Emit one particle at the origin, shooting straight up. // The size of the particle is 0.2 and it will live 2 seconds long. emitter.Emit(Vector3.zero, Vector3.up, 0.2, 2, Color.yellow); }

public function Emit(pos: Vector3, velocity: Vector3, size: float, energy: float, color: Color, rotation: float, angularVelocity: float): void;
public void Emit(Vector3 pos, Vector3 velocity, float size, float energy, Color color, float rotation, float angularVelocity);

パラメーター

rotation 度単位のパーティクルの初期角度
angularVelocity 秒あたりに回転するパーティクルの初期角速度

説明