Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by WirealTalha · Aug 08, 2018 at 03:26 PM · 2d gameresolution2d spritesaspect-ratioaspect ratio

Unity 2D Scaling For All Mobile Devices. What Resolution to use to keep Sprites Sharp and Avoid Blurriness?

Hello Everyone! I'm a Newbie. I have learned a lot very fast, BUT I'm stuck on a very "basic" issue. It's Scaling. What's up with that? I cant seem to find any satisfying answer related to scaling of your 2D game, Every answer is different and more confusing than prior. Could anyone be so kind to guide me.Its been ten days and Mr google seems to fail me for the first time ever.I want to learn everything about aspect ratios and what sort of resolutions to use in unity. Does it have to be Highest resolution first? How to optimize the game for all mobile devices. I have all the sprites ready in Photoshop. Feel like giving UP.,Hello! I'm a Newbie. I have learned alot very fast. BUT i have wasted 10 days on Scaling and have found "Zero" satisfying Answers.

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 FernandoHC · Aug 08, 2018 at 04:17 PM

The simplest answer I can think of: your image is going to be affected by the screen current resolution, therefore your images must follow the adequate size of the resolution. Let's say you have a 1920x1080 resolution (the most common one nowadays), if you want to display a sprite of that size perfectly sharp, you must have a sprite with the dimensions 1920x1080. If you want to display a perfectly sharp object of 50x50, you must have a texture of the same size, and so on. Scaling is the process of changing the position of the pixels, hiding or duplicating, of an image, so there will almost always be blurry or sharpness issues if they are scaled. Depending on the technique used.

If you want to adequate your images to every device, you can get the info at Screen.currentResolution and set your canvas to the native screen size, and use the appropriate textures for each case.

Comment
Add comment · Show 2 · 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 WirealTalha · Aug 10, 2018 at 09:41 PM 0
Share

Cheers $$anonymous$$ate for replying. It cleared me $$anonymous$$d to some extent. Could you please help me further decode this sorcery?

like i have two things right now. @FernandoHC I have the landscape and menu buttons (store play etc) in illustrator(they are of high quality 8000+ resolution) and sub menus etc is in Photoshop(back button store panel pause menu etc) they are of relatively low resolution. so where do i go from here? 1.export all images one by one? without changing the resolutions of the images right? simple pngs? or simple jpegs? 2.all buttons and panels have different resolutions (50x50) (72x76) etc. What to do? 3.when i import them and put them in button and give them the native size, they take whole of canvas. should i change ppu of all sprites? 4.i have seen some projects where they have all sprites in different resolutions. what up with that? 5. The frame rate differs when i put the game in different aspect ratios. How to fix that? ($$anonymous$$y game is a side scroller game infinite)

avatar image FernandoHC WirealTalha · Aug 13, 2018 at 09:29 AM 0
Share

Try having all the texture images in PNG format without compression for better quality, in the case of buttons and dynamically rect shape where you want to stretch border faces you should use 9 slice type of sprites. Have the images be in the closest resolution possible to the image size being displayed on the screen. If you change resolutions and the images change in a way that's not divisible or multiple by 2, then a new texture should be created with the new resolution. (if you notice rendering issues, don't go on crazy creating textures without even checking how the look). In the start of the project you have to define which resolutions your game is going to support, this is done so all the art can have a direction to go when creating content. If your button native size is taking over the canvas, that means your canvas is too small. Your canvas size(if root canvas) should match the native size of the screen always, unless you are forcing smaller screen sizes for performance. I would recommend using the native's device resolution always as it will work better in most cases. Framerate drop can be caused by a lot of things, including over-filling canvases. If you have huge textures, which is not recommended you should take into account that every active texture in the game scene will be drawn, no matter if inside or not the camera. So you should be careful on what you have active in the scene. Have a read at this article for more info on this: https://unity3d.com/learn/tutorials/topics/best-practices/fill-rate-canvases-and-input#child-order

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

103 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mobile Development screen resolution and aspect ration 1 Answer

Problems with camera and screen resolutions 1 Answer

How to Continue Enemy Movement Without Updating the Position 0 Answers

2D RPG boomerang instantiation help. 2 Answers

How to make "circle" sprite’s border more smooth? 1 Answer


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