2017-07-01から1日間の記事一覧
Unity5.6だとパーティクルのstartColorが古くなっていると警告されたので、新しい設定方法です。 GetComponent<ParticleSystem>()はなく、ParticleSystem.MainModuleのGetComponent<ParticleSystem().mainのインスタンスを変数に取り出して、そのstartColorに色を設定すればいけました。 例えば、開始時にパーティクルを赤くしたい場合は以下の通り。 void Start () { ParticleSystem.MainModule par = GetComponent<ParticleSystem>(…</particlesystem().mainのインスタンスを変数に取り出して、そのstartcolorに色を設定すればいけました。></particlesystem>