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
1
Question by vspin · Oct 27, 2016 at 06:43 AM · 2dsizeviewportworldpixels

How to maintain world and game object pixel size no matter the screen size?

(Unity 5.5.0b8)

I can't seem to find the right terms to find the answer to my question, and I would imagine it's been asked many times, so I apologies in advance..

I'm trying to create a 2D isometric game world. My game will have a scrollable game world (entire map) and viewport (the client's viewable area). The client will only view part of the world depending on their screen size (viewport). My world and the game objects within should maintain their actual pixel size no matter the device used to play the game.

How can I accomplish this (roughly)? Everything I do seems to scale my world and game objects depending on the screen size.

Comment
Add comment · Show 3
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 NoseKills · Oct 27, 2016 at 02:54 PM 0
Share

Can you elaborate on what you mean by "actual pixel size"? Do you mean you want an 8x8 image to use 8x8 pixels on the screen no matter the device resolution?

avatar image vspin NoseKills · Oct 27, 2016 at 02:59 PM 0
Share

Yes. If I have an 8x8 pixel image in the game world, I want it to display as an 8x8 pixel image, no matter the screen resolution. Thanks :)

avatar image suicune2001 · Oct 28, 2016 at 12:43 AM 0
Share

If I understand your question correctl, you need to work with the Anchors. It's those little triangles you see either clustered in the center of the Canvas or around your image. They are very useful when making 2D menus to keep them in place no matter what screen resolution you have. Just click and drag the arrows to be the exact spot you want that picture / text / button to always be.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Glurth · Oct 27, 2016 at 03:34 PM

http://answers.unity3d.com/questions/588432/why-2d-camera-is-not-pixel-perfect.html perhaps this will help? I've never tried tonic's answer- looks like it should work though.

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 vspin · Oct 27, 2016 at 07:46 PM 0
Share

Thank you. :) It works.

avatar image Glurth · Oct 28, 2016 at 07:06 AM 0
Share

great! and thx to whoever converted my comment to an answer :) $$anonymous$$ay I suggest, lets all upvote the linked-to question, and tonics answer?

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

7 People are following this question.

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

Related Questions

Unity 2D: Size of a sprite proportional to the size of the viewport? 0 Answers

What is the most performance efficient way of changing the color of individual pixels entirely through code? 1 Answer

Viewport ratio appears inconsistent in 2D game 1 Answer

Size limits on sprite sheet? 1 Answer

Unlimited world size in Unity3d (by a trick) & maximum speed? 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