protected virtual void Start()
 {
     particle = GetComponent <GPUParticleBase <T> >();
     if (particle != null)
     {
         particleNum       = particle.GetParticleNum();
         particleBuffer    = particle.GetParticleBuffer();
         activeIndexBuffer = particle.GetActiveParticleBuffer();
         activeCountBuffer = particle.GetParticleCountBuffer();
         //Debug.Log("particleNum " + particleNum);
     }
     else
     {
         Debug.LogError("Particle Class Not Found!!" + typeof(GPUParticleBase <T>).FullName);
     }
 }
Exemplo n.º 2
0
    protected virtual void Start()
    {
        particle = GetComponent <GPUParticleBase <CircleData> >();
        if (particle != null)
        {
            particleNum       = particle.GetParticleNum();
            particleBuffer    = particle.GetParticleBuffer();
            activeIndexBuffer = particle.GetActiveParticleBuffer();
            activeCountBuffer = particle.GetParticleCountBuffer();
            Debug.Log("particleNum " + particleNum);
        }
        else
        {
            Debug.LogError("Particle Class Not Found!!" + typeof(GPUParticleBase <CircleData>).FullName);
        }

        material = GetComponent <Renderer>().material;

        SetMaterialParam();
    }