Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';不能再使用c#particleSystem属性了?_C#_Unity3d_Unity5_Particle System_Deprecation Warning - Fatal编程技术网

Can';不能再使用c#particleSystem属性了?

Can';不能再使用c#particleSystem属性了?,c#,unity3d,unity5,particle-system,deprecation-warning,C#,Unity3d,Unity5,Particle System,Deprecation Warning,我以前能够在Visual Studio C#代码中使用 但现在它给了我一个错误。语法改变了吗?我必须使用吗 GetComponent<ParticleSystem>().SetParticles(points, points.Length); GetComponent().SetParticles(点、点、长度); 现在?我的VS项目(在这里使用Unity)不再显示我的粒子,但我还没有找到我可以/应该使用的任何其他语法。这是正确的吗?我还有其他错误吗?或者这是错误的? 谢谢。基于

我以前能够在Visual Studio C#代码中使用

但现在它给了我一个错误。语法改变了吗?我必须使用吗

GetComponent<ParticleSystem>().SetParticles(points, points.Length);
GetComponent().SetParticles(点、点、长度);
现在?我的VS项目(在这里使用Unity)不再显示我的粒子,但我还没有找到我可以/应该使用的任何其他语法。这是正确的吗?我还有其他错误吗?或者这是错误的? 谢谢。

基于,这是另一个最近(自版本5.4.0以来)被弃用的属性

因此,是的,您现在必须使用
GetComponent()
来获取对粒子系统的引用,并且您可能希望在需要频繁使用该引用的情况下,将该引用缓存在方法中的变量中。

基于,这是最近使用的另一个属性(自版本5.4.0起)不赞成


因此,是的,您现在必须使用
GetComponent()
来获取对粒子系统的引用,并且您可能希望在需要频繁使用该引用的情况下,将该引用缓存在方法中的变量中。

它是否给出任何特定错误?@stuartd它告诉我particleSystem.SetParticles()已过时,并告诉我使用GetComponent行。我像他们说的那样使用它,但现在我没有粒子。当然,你现在使用“GetComponent”来表示这个词-没有什么大不了的,它会给出任何特定的错误吗?@stuartd它告诉我particleSystem.SetParticles()已经过时,并告诉我使用GetComponent行。我像他们说的那样使用它,但是现在我没有粒子了。当然,你现在用“GetComponent”来做这个-没什么大不了的
GetComponent<ParticleSystem>().SetParticles(points, points.Length);