void Start()
{
ps = GetComponent<ParticleSystem>();
psr = GetComponent<ParticleSystemRenderer>();
// emit in a sphere with no speed
var main = ps.main;
main.startSpeedMultiplier = 0.0f;
main.simulationSpace = ParticleSystemSimulationSpace.World; // so our particle positions don't require any extra transformation, to compare with the mouse position
var emission = ps.emission;
emission.rateOverTimeMultiplier = 200.0f;
var shape = ps.shape;
shape.shapeType = ParticleSystemShapeType.Sphere;
shape.radius = 4.0f;
psr.sortMode = ParticleSystemSortMode.YoungestInFront;
// send custom data to the shader
psr.EnableVertexStreams(ParticleSystemVertexStreams.Custom1);
for (int i = 0; i < ps.main.maxParticles; i++)
{
customData.Add(new Vector4(0.5f, 0.5f, 0, 0));//offset the uv at the atlas
}
ps.SetCustomParticleData(customData, ParticleSystemCustomData.Custom1);
}
I want to chang the uv in start ,but can not work .I do not want to chang the uv in UPDATE,it is not good performance
