Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Do Particle Systems render sprites at a different scale?

Discussion in '2D' started by ShervinM, May 23, 2020 at 6:09 AM.

  1. ShervinM

    ShervinM

    Joined:
    Sep 16, 2017
    Posts:
    40
    Heyo!

    So my repro is pretty simple here. I have an object that has a sprite renderer and an animator. I also have a script attached attached that feeds the spriterenderer.sprite to a particle system. The particle is set to emit using texture sheet animation, using only 1 sprite reference ever (which keeps getting hot swapped out at runtime with the aforementioned script).

    Now the problem I'm seeing is that the emitted sprite is distorted in its scale. What i've highlighted in red are eye-balled adjustments i had to make to the start size of the particles so that they match the same size as what the sprite renderer shows.

    So simply put, why would the particle system (despite having a (1,1,1) scale on both the object and the start size param in the particle system) render the exact same sprite a different scale than what the sprite renderer would show?

    upload_2020-5-22_22-4-38.png
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,500
    I think it’s supposed to use the size of the sprite.. a bug report would be useful so we can double check this, and figure out if there any settings in your sprite that we have failed to take into account.
     
    karl_jones likes this.
  3. ShervinM

    ShervinM

    Joined:
    Sep 16, 2017
    Posts:
    40
    Hey @richardkettlewell ! Thanks for the quick reply.

    So I did some testing in a brand new project (2019.3.1f1) and it turns out that the Pixels Per Unit (PPU) property has no effect on the particle rendering (while it does on the sprite renderer). Check out this simple repro project with the sample scene i made. Just simply select the particle system to preview it rendering the sprite above the sprite renderer.

    The sizes are different. You can adjust the PPU but the particle system wont respond to it.

    Repro Project:
    https://drive.google.com/file/d/17_RO5mlxT8HRHjBJKnRvmBLzvPpa3hd5/view?usp=sharing
     
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,500
    Thank you that’s amazing that you narrowed it down like this!

    If you report a bug through the bug reporter (help/report a bug in the editor) you’ll get notifications when we fix it, plus it makes it easier for me to backport if I have a report saying you need it fixed in a certain version of Unity - but if you’d prefer not to, I understand, we can fix it anyway, just you won’t get notified ;)

    You can mention me/this forum link to get it processed by QA without any potential hassle I.e them asking extra questions.
     
    ShervinM likes this.
  5. ShervinM

    ShervinM

    Joined:
    Sep 16, 2017
    Posts:
    40
    Thanks @richardkettlewell,

    I've went ahead and filed the bug.

    Thanks again for your help, I very much appreciate it :)
     
    MelvMay and richardkettlewell like this.
  6. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,500
    Thanks! What’s the case number?
     
  7. ShervinM

    ShervinM

    Joined:
    Sep 16, 2017
    Posts:
    40
    richardkettlewell likes this.
unityunity