I made ParticleSystem and set in player script public variable to add the reference to my ParticleSys prefab.
public ParticleSystem expl;
And then in Die() method I would like to make some explosion, but I don’t know how can I Instantiate() this ParticleSys in the current position of player(this script attached to it).
It’s work now. But, problem that when it instantiate it moves with camera. How can I make it stay on the spawn position?
Maybe I can spawn it as child of “RedBird” object? But, then new question, how spawn in as child?
I decided not to make Invoke way, because I found, as I think, more easiest way. I made Coroutine and set timer to 3sec and after particle finished her animation I deleted this. It’s work fine with GameObject.Find Thx for answering this topic
Yeah, but now I try to learn and solve another problem. If u want you can see my another topic, cause this is only about ParticleSys. I try to learn it, but I can’t find good example how to use it (I talking about another my topic:)
It doesn’t work for me bc I cant add a ps to my public variable, it has to be attached as a component (cant’ be a game obhject) to a game object and that game object isn’t found when I search for a compatible component to add to the public variable (ps).
I tried explose.emission.SetBurst();but VS doesn’t detect the Unity - Scripting API: Burst UnityEngine.ParticleSystemModule module when I using it. It should detect when just UnityEngine as using, right?