• 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?

Show more comments
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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

How to determine the distance an object has to be from camera size in order to display a pucture perfect texture in perspective mode? 1 Answer

Dynamic Interactive 2d World Map 0 Answers

How can I set the position and size of a sprite from inside a script ? 1 Answer

Fake 2D world rotation by moving elements of the world 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