2019/04/23

[Unity] Get Particle System Infomation

Start

private ParticleSystem mParticle;
private ParticleSystem.MainModule mParticleMainModule;

void Start()
{
    mParticle = new ParticleSystem();
    mParticle = gameObject.transform.GetChild(0).gameObject.GetComponent<Particlesystem>();
    mParticleMainModule = new ParticleSystem.MainModule();
    mParticleMainModule = mParticle.main;
}

void Update()
{
    mParticleMainModule.maxParticles = 100;
    mParticleMainModule.startSize = 0.3f;
}


END