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 NINJ4Z · Jul 06, 2014 at 12:24 AM · c#camerascalingresize

How Do I Build My Application To The Size Of The Camera

I'm quite confused when it comes to resolutions and aspect ratios and the like. I'm trying to build my game to the size of the window viewable in the inspector and have it fixed so that it's not resizable.

I've tried sereral different ways about it but in all cases, I'll either end up with my GUI not being positioned correctly or having a black letter box view of the application.

alt text

sddsfs.png (176.2 kB)
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 Ngoc Ngo · Jul 07, 2014 at 09:08 AM 0
Share

You may want to clarify your question a little bit, as we readers have yet to know what have you done or what have gone wrong.

avatar image Sawula · Jan 08, 2015 at 06:39 PM 0
Share

It might be a problem that beginner understand since I get exactly what he means, but having the same problem, cannot help at all.

I have one camera in my game. It allow me to see a certain amount of the game scene, like a tv screen. But when I build my game, I end up with a 'screen' of a completely different size, with my text sprawled all over the place except where I want it to be. Yet when I was setting it up in Unity, it was placed fine...

avatar image Scribe · Jan 08, 2015 at 07:01 PM 0
Share

The problem is cause by unity saving your previous builds preferences, the nice method to fix this if to create a new c# script named PlayerPrefReset and copy and paste the following code into it.

 using UnityEngine;
 using UnityEditor;
 using System.Collections;
 
 public class PlayerPrefReset : EditorWindow {
     [$$anonymous$$enuItem("Edit/Reset Playerprefs")]
     public static void DeletePlayerPrefs(){
         PlayerPrefs.DeleteAll();
     }
 }

Once you have that compiled go to Edit -> Reset Playerprefs and click. That will remove the preferences that keep stopping it working.

After that go to Edit > Project Settings > Player, and set up the appropriate stuff there e.g. not full screen, put in your specific resolution, probably set 'Show resolution dialog' to disable etc.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by MechanicalGaming · Jan 09, 2015 at 12:30 AM

I had this problem when I first started... Go to "File" (on the menu bar) then onto "Build Settings..." and then a window will come up. On the bottom there is "Player Settings...". Once clicked, there will be a menu in the inspector, you can change the sceen size from there and then scale the camera view until it fits the square.

Edit: Just noticed this was asked in Jully... I'm guessing my answer was useless...

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 Sawula · Jan 09, 2015 at 02:27 PM 0
Share

No no it wasn't... well sorta, I found the solution some $$anonymous$$utes before seeing your answer actually XD I did edit the player settings before, when I started making my game, but my UI text still was all over the place. To make it fixed, what I did was activate the "resize to fit screen" option on the Canvas, and pick the "Expand" sub-option. Now it's perfect ^^

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

6 People are following this question.

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

Related Questions

Texture not showing 1 Answer

How could I deal with the resolution and camera size? 0 Answers

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Raycast in camera 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