I have this code here. With the old particle system i had no problem to play it with the old keywords ParticleEmitter instead ParticleSystem and emit instead play.
The particle system is in the variable slot. Test goes to true with a collision. The collision triggers. But the particle system does not play. I get an error instead:
- MissingFieldException: Field 'UnityEngine.ParticleSystem.play' not found.
The reference says that i have to use Play though (by the way, why is the first letter big here? Shouldn`t it be a small letter?)
What is wrong here?
Typical case of RTFM: Particle System. The docs already describes all of the methods the class has.
ParticleAnimator, ParticleEmiter and ParticleRenderer are part of the legacy (old) Particle system.
ParticleSystem, ParticleSystem.Particle and ParticleSystemRenderer are the new Shuriken Particle classes
This was and is always my first way. But this didn`t help me, as usual. I nearly always end in the forum when i have a look at the reference. Because it is more a dictionary. And doesn`t really help with the useage in most cases.Typical case of RTFM
I was in need of Dantus`s code snippet to understand what is meant. And then i understood it very quick. So again thanks Dantus.
You can see it in the documentation that you are dealing with a function (method). The line just below the title is:
I struggle with this kind of things too if I have to implement something in UnityScript, as it doesn't (or maybe didn't?) have such good autocompletion as C#.function Play (withChildren : boolean = true) : void
@Tseng: You can not tell someone RTFM, if he even posted a link to it .
Yes, but i didn`t realize it until i saw your code snippet. I was too focused at the old method with the flag. My brain refused to accept what it has read. Maybe i should have a look for a new brain. Do you have one left?You can see it in the documentation that you are dealing with a function (method). The line just below the title is: