Search Unity

Attach One emitted particle to object position?

Discussion in 'Scripting' started by DJ_DiX, Sep 4, 2019.

  1. DJ_DiX

    DJ_DiX

    Joined:
    Aug 1, 2017
    Posts:
    12
    Hello all.
    I'm have One Particle System in scene with SimulationSpace = "World"

    And some spawning in scene objects. At spawn they move this PS to spawn point and emit one particle:

    Code (CSharp):
    1. void OnEnable()
    2. {
    3.    GV.MainPS.transform.position = this.transform.position;
    4.    GV.MainPS.Emit(1);
    5. }
    Question - How i can "attach" emitted particle to spawned transform position while this particle still alive?
    Like:
    Code (CSharp):
    1. void Update() { SpawnedParticle.position = this.transform.position; }
    I know that i can get particles array, but i cant understand, how get link to some unique particle of this array and move only it.

    Or it's not possible?