随时间变化的帧乘数。
如果只想更改整体随时间变化的帧乘数,则此方法比访问整条曲线更加高效。
using UnityEngine;
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;
}
}