Unity新粒子系统转换

时间:2019-02-23 08:03:54

标签: unity3d

我试图将旧的单位粒子发射器转换为新的手里剑系统。这是我到目前为止所做的;

转换前;

private Particle[] particles;

void Start()
{
    oneOverZigs = 1f / (float)zigs;
    particleEmitter.emit = false;

    particleEmitter.Emit(zigs);
    particles = particleEmitter.particles;
}

转换后;

private ParticleSystem.Particle[] particles;

void Start()
{

    oneOverZigs = 1f / (float)zigs;

    GetComponent<ParticleEmitter>().emit = false; --> Particle Emitter doesn't contain  'emit'

    GetComponent<ParticleEmitter>().Emit(zigs); -->  Particle Emitter doesn't contain  'Emit'

    particles = GetComponent<ParticleEmitter>().particles; -->  Particle Emitter doesn't contain  'particles'


}

我在代码上方指定了错误。我再也不能转换了。如何将3行转换为新系统?

0 个答案:

没有答案