Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by ZeHgS · Jun 24, 2015 at 10:46 AM · 2dspritescaleruntime

How expensive is scaling in 2D unity? Is it better to pre-scale?

I'm sketching out my 3D looking 2D game so I can prepare myself code-wise and I have a question. As you can see in the image below, the group of orcs is made of only two re-scaled sprites https://www.dropbox.com/s/50t3zw3t9fz27bw/optimized.png?dl=0

My question is, how expensive is scaling in terms of performance? Is it better to have a single sprite as big as the biggest sprite I'm gonna need and then scale it in code, or is it better to have one sprite for each of the sizes I'm gonna need? In case it's relevant, I estimate I'm going to need something like 15-25 characters, with 3-7 animations each and each animation is going to have 2 versions, one for each angle.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
-1

Answer by KristianBalaj · Jun 24, 2015 at 07:57 PM

Yes, better is when you scale your sprites for example in photoshop so big how you need in your application and then not scaling sprites in Unity, to save performance.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ZeHgS · Jun 24, 2015 at 08:26 PM 0
Share

Thanks a lot for your answer! Would it be possible to use one camera with a different size for each of the rows the characters walk in? Or a 3d camera and adjusting z values?

avatar image ByteSheep · Jun 24, 2015 at 10:08 PM 0
Share

If you are trying to mimic a 3d environment with proper scaling etc for the sprites then I would go with the last option you mentioned.
Simply use a 3d camera and move the sprites in all three axis - scaling and rotation will automatically be handled and you won't have any weird batching problems.

avatar image ZeHgS · Jun 24, 2015 at 10:10 PM 0
Share

Great, thanks a lot! This will really help keep down the final game size, compared to having to re-scale them in Photoshop

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Best way to sacale entire object in runtime?? 0 Answers

How do importing image when game is running (Run Time) ???? 0 Answers

How do I scale a 2D sprite over time? 2 Answers

Creation of Edge Colliders at Runtime 0 Answers

Adjust scale of object when changing the draw mode of prefab? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges