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.
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.
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 ?”
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.