Search Unity

Question Particle System Emit(EmitParams) + Sheet Animation

Discussion in 'General Graphics' started by mitaywalle, Feb 17, 2021.

  1. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    247
    Hello! Can I Setup particle to choose specific start frame for Emit()?
    My ParticleSystem is decals in atlas, and I call this way:
    - PS.Play()
    - PS.Emit(EmitParams,1)
    - PS.Stop()

    And all work ok, but I wanna choose specific start frame for each particle, not breaking already spawned particles. I've don't found public API for that. Is there any workaround (mb using StartFrame Curve + lifetime or calculate sepcific seed for particle, to force it choose specific frame)

    Any help is apprecieted, good luck to all!
     
    crekri likes this.
  2. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    247
    found workaround - i use ParticleSystemAnimationTimeMode.Speed , and set very low speed range, and and each particle get different speed (speedDelta - speedDelta*16 , for atlas of 16 sprites)
     
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    A coroutine could allow you to defer execution of this code
     
  4. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    247
    Hello! thanks for answer. At this moment everything looks as needed, except I don't know, is ps really stopped after call play -> emit -> stop
    upload_2021-2-18_12-7-16.png
    1 - Need I to do coroutine delayed each call?
    2 - Can I somehow check, that ps is not simulated after call stop?
     
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    mitaywalle likes this.
  6. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    247
    Really appreciete references, I'll check this a bit later, big thank for information. Have a great day. Thank you, for particle system :)
     
    richardkettlewell likes this.