Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What would be good way to scale sprites drawn with SpriteRenderer?

Discussion in '2D' started by hepphep, Jan 24, 2014.

  1. hepphep

    hepphep

    Joined:
    Feb 1, 2013
    Posts:
    24
    I would need to scale some instances of sprites drawn with SpriteRenderer on runtime. The only way I have found so far is to change gameobject's localScale, but unfortunately it has major performance issues that makes it useless in practice.

    Are there any other feasible way to scale the sprites available at the moment?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    What major performance issues? I haven't seen any.

    --Eric
     
  3. Vitor_r

    Vitor_r

    Joined:
    May 23, 2013
    Posts:
    93
    I think this one here with non-uniform scaling...
     
  4. hepphep

    hepphep

    Joined:
    Feb 1, 2013
    Posts:
    24
    Oh gosh! Yes, I was thinking of it as being non-uniform scaling issue that was noted in some cases with localScale around, but after Eric's reply I started to scratch my head if it really could be that I missed something else and indeed the localScale was not issue after all.

    Silly thing, had been troubleshooting it as localScale issue for a day and then realized that it was not in the case in an hour after posting.

    So, localScale is just fine, it was my own mistake. Thanks for your both for your replies though :)

    .. as a note to myself, whenever I become rich enough, the profiling tools would most likely be good enough reason to invest for pro version :D