• 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
4
Question by TokyoDan · Aug 16, 2013 at 12:46 AM · resolutionstandalone

Why doesn't Standalone Build Resolution settings affect the standalone size

I try to make a Mac standalone size of 512x384. So I go to Player Settings for PC, Mac & Linux Standalone. And Under Resolution I set Default Screen Width / Height to 512 and 384 respectively.

I build the app. But when I run it it is the same big size that it was when I previously built it with Default Screen Width / Height set to 1024 and 768 respectively. Why?

It seems that these setting don't have any effect. (And I do NOT want to use the Display Resolution Dialog)

P.S. I asked this is the forums but I never seem to get any help there anymore.

Comment
Add comment · Show 2
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 Joyrider · Aug 16, 2013 at 01:39 AM 0
Share

Seems like a bug to me, the only default screen values accepted are those that are displayed in the Resolution Dialog. If I input any other resolution, it keeps the previously correctly entered one. So yeah, only seems to work with the standard resolutions at the moment (4.2.0f4).

avatar image TokyoDan · Aug 16, 2013 at 02:12 AM 0
Share

Someone on Google+ helped me. It was the old preference file interfering. After deleting it I was able to get the size I wanted so it is possible to get sizes that aren't displayed in the resolution dialog.

3 Replies

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

Answer by MorphVGX · Feb 03, 2014 at 09:25 PM

What solved the problem for me was:

 [MenuItem("Edit/Reset Playerprefs")]
 public static void DeletePlayerPrefs()
 {
     PlayerPrefs.DeleteAll();
 }

Then, in the Unity Editor, go to Edit -> Reset PlayerPrefs.

Done =D

You can do it without the game/app running.

Comment
Add comment · Show 9 · 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 raiden · Jul 06, 2014 at 01:56 PM 0
Share

$$anonymous$$orphVGX - Perfect Answer! Been struggling with this off and on for a couple hours, tried like you said, and it works!

Thanks

avatar image Julien-Lynge · Oct 01, 2014 at 04:55 AM 0
Share

I saw this same issue when setting 'Use Native Resolution' - it ended up being stuck at 1024x768. Using your snippet solved the issue for me. Gracias!

avatar image MorphVGX · May 19, 2015 at 08:22 PM 1
Share

Write that code in a script in a folder called Editor. I think that is it.

avatar image angrybuddha · Sep 17, 2015 at 11:38 PM 3
Share
 using UnityEditor;
 using UnityEngine;
 
 public class Add$$anonymous$$enu : EditorWindow {
 
     [$$anonymous$$enuItem("Edit/Reset Playerprefs")]
 
     public static void DeletePlayerPrefs()
     {
         PlayerPrefs.DeleteAll();
     }
 
 }

Here's the full code - This script goes in the editor window

avatar image IanGRap · Sep 12, 2016 at 09:26 PM 1
Share

Im working on a mac and am having trouble finding the exact place to write this code. Could anyone give a specific location? (I'm still pretty new to all this so I'm probably missing something really obvious)

Show more comments
avatar image
2

Answer by TokyoDan · Aug 16, 2013 at 02:17 AM

Note: I got help from someone in the Unity Community on Google+.

This is the answer I got and It fixed my problem:

"Is it possible that it's picking up preferences from a previous build of the app that was run with the resolution dialog enabled and 1024x768 was selected ? Preferences file lives in ~/Library/Preferences/unity...plist, maybe try deleting it ?"

Comment
Add comment · Show 3 · 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 exorbio · Nov 26, 2013 at 09:20 AM 0
Share

I'm currently having the same problem. However, I can't find the preferences file. I've done a search for it and also have windows showing all hidden files and folders. I'm using version 4.3.0f4, so maybe things have changed. Or is this maybe a pro thing (I'm not using pro)?

avatar image exorbio · Nov 26, 2013 at 09:59 AM 0
Share

Nevermind. The location in the above post is for $$anonymous$$ac. For Windows, preferences are stored in the registry. Here's a link explaining where: http://docs.unity3d.com/Documentation/ScriptReference/PlayerPrefs.html

avatar image MorphVGX · Feb 03, 2014 at 04:09 PM 0
Share

I found the prefs folder and deleted it but that didn't fix the problem.

avatar image
0

Answer by highflier · Sep 13, 2015 at 09:31 AM

Add these lines to the start of your program Playerprefs.deleteall(); application.quit

Then remove those line and run again. I am currently trying a to find a way to automate the process but this does work.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

25 People are following this question.

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

Related Questions

Mac Retina Support Standalone OSX 1 Answer

GUI Texture resolution problem. 1 Answer

PC standalone resolution 0 Answers

Standalone fullscreen-fixed size 0 Answers

Issues with mouse input after resizing Standalone 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges