0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

パーティクルシステムをスクリプトで制御する(Unity)

Posted at

やり方

public class Test : MonoBehaviour
{
    [SerializeField] private ParticleSystem particle;

    void Update()
    {
        //スペースキーを押すとparticleを再生
        if(Input.GetKeyDown(KeyCode.Space)) particle.Play();

        //左シフトキーをクリックするとparticleを停止
        if(Input.GetKeyDown(KeyCode.LeftShift)) particle.Stop();
    }
}

音楽を再生、停止するときとやり方は同じなので、一度やり方を覚えれば忘れないと思います!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?