帧随时间推移的乘数。
如果您只想更改帧随时间推移的总体乘数,则更改此属性比访问整个曲线更有效。
using UnityEngine;
[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSystem ps;
void Start() { ps = GetComponent<ParticleSystem>();
var main = ps.main; main.startLifetimeMultiplier = 2.0f;
var tex = ps.textureSheetAnimation; tex.enabled = true; tex.numTilesX = 4; tex.numTilesY = 2; tex.frameOverTimeMultiplier = 2.0f; } }