Unity的粒子系统中无法设置两个startSpeed常量

问题描述 投票:0回答:1

enter image description here

这就是重现错误所需的全部内容:

public ParticleSystem light_ps;

private void Start()
{
    ParticleSystem.MainModule new_main = light_ps.main;
    new_main.startSpeed.constantMax = 10f;
}
c# unity-game-engine unityscript
1个回答
0
投票

我找到了答案:

ParticleSystem.MainModule new_main = light_ps.main;
new_main.startSpeed = new ParticleSystem.MinMaxCurve(5, 10);
© www.soinside.com 2019 - 2024. All rights reserved.