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
0
Question by RossClements · Mar 22, 2015 at 09:20 AM · cameraspritesize

Question about sprite size and camera size

Hi

I want to make a sprite that covers the whole screen. My camera size is 8. How do i know how big the size of the sprite must be to cover the whole screen?

Iv'e been trying to "test" how big the size must be by making a , lets say 3000x2000 image in Gimp and importing it to Unity. If its to small to cover the screen i make it bigger etc. This will take so much time to make it fit the whole screen perfectly.

There has to be and easy way?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Priyanshu · Mar 22, 2015 at 10:08 AM

If your image is 3000x2000. It means it covers 3000 pixels of screen width and 2000 pixels of screen height.

When you import an image in Unity. There is an option called 'Pixels per unit' in the import settings. Usually its set to 100.

That means 100 pixels of your image will cover 1 unit in Unity. 1 unit in Unity =

  • Distance between transform.position.x = 1 and transform.position.x = 2

  • If scale of Unity cube is 1 x 1 x 1. It covers 1 unity Unit in Length.width.height or Volume.

Now if you import image with resolution 3000x2000 in Unity and Pixels per Unity is set to 100. Your image will cover 30 Unity units in width and 20 Unity units in height.

Now about Camera:

Camera size is half of Camera height. If your Camera size is 8. Your Camera will cover 16 Unity units. To Cover 20 unit Height of your Image (Calculated above), Camera needs to be 20/2 = 10 units. Now your image will fill the camera in height.

Camera width is in proportion to resolution selected. If your resolution is 3000x2000 and your camera size is 10 i.e. your camera is covering 20 units in height (Calculated above). It will cover 30 units in width.

This answer was an attempt to clear the concept of image resolution, 'Pixels per unit' in the import settings, Camera size.

To solve your problem, you can either adjust the pixels to units number in the import settings as suggested by @BoredMormon or you can adjust Camera size or you can Altogether change the resolution of your image. Depends on what settings you want to keep and what settings you want to change.

Comment
Add comment · 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
0

Answer by Kiwasi · Mar 22, 2015 at 09:20 AM

The easier way is to adjust the pixels to units number in the import settings.

Comment
Add comment · 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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Orthographic Camera Size? 3 Answers

Sprite facing multiple cameras? 1 Answer

Resolution, camera size and 3D game objects 0 Answers

How can I make a layer black? Unity 2D 1 Answer

Unity 2D: Pixel Perfect Camera + Resolution Help 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