• 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 Klaus · Apr 03, 2011 at 04:35 PM · spritemanager2

Positioning pixel perfect sprites in editor

Hi!

I just bought Sprite Manger 2 and I would like to use the editor to place pixel perfect sprites to their desired position. I use a (pixel perfect) 768x1024 backdrop. My monitor only has 1680x1050. Since Unity uses some screen space I never see the full backdrop in Unity when I press play (with maximize on play turned on).

The problem: The sprites are positioned differently in the build application than in the editor (scene view). It seems the sprites get "repositioned" relativly to the game view size. For example: I press play with maximize on play. Then I adjust the sprites in the scene so it looks good. Then I press play without maximize on play and after that all sprites are dislocated in the scene view. When I build the application the sprites are also positioned differntly again in the app. Since my monitor resolution is not high enough to see the full backdrop I am never able to place my sprites pixel perfect.

Required solution: I would either need a bigger monitor or some other solution like scaling the scene view or whatever. What can I do?

alt text

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
Best Answer

Answer by Brady · Apr 04, 2011 at 06:20 PM

Pixel-perfect should only affect the sizing (which of course can indirectly affect positioning as well), since a pixel-perfect sprite will be a different world size at different resolutions so that it can always be the same screen-size at any resolution.

But the world position of a pixel-perfect sprite should always be the same, unless your code is somehow positioning it in a resolution-dependent way.

That said, there is a new "EZScreenPlacement" component you can attach to your sprite that will position it using screen pixels relative to edges of the screen, if that will help.

But if you just set a world position of a sprite, that should not get changed on its own. If you need things to remain in the same relative positions at the same relative sizes regardless of resolution, then in that case you will want to disable pixel-perfect and perhaps instead use the sprite sizing script included (click Tools->A&B Software->Size Sprites) to size the sprite to the desired size for your "standard" target resolution. Everything will then be proportionate at other resolutions.

I hope that helps.

Comment
Add comment · Show 1 · 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 Klaus · Apr 12, 2011 at 08:55 PM 0
Share

Thank you for the helpfull information! Just to have all others benefit from your P$$anonymous$$ as well:

I use Size Sprites now with target size 1024. I also set the size of my orthographic cam to half the size of the target resolution, in this case 512, so it fits my backdrop perfectly.

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

No one has followed this question yet.

Related Questions

Unity 3d Grid 0 Answers

SpriteManager2 Atlas Creation Problem 1 Answer

Sprite manager 2.0 canvas size? 5 Answers

Unified cross-platform project? 1 Answer

ScriptManager 2 - multiple materials 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