unity PC build settings screen resolution doesn't work? - unity3d

i'm trying to run with my own resolution so I inserted the resolution in the build settings. However, when I build it and run, there is no screen resolution option for the one I inserted. I want to build with screen by 9:16(common mobile resolution) but there are only ones like 10:9 or 16:9.
I search on Google and they told me to go to 'Edit'->'Player'->'Player Settings' but there is no 'Player' in mine.
Can anyone tell me how to set up resolution?

9:16 and 16:9 aspect ratios are the same so you should be fine by using 16:9 and changing the screen orientation.
You can read more on the screen orientation here and you can set it in Player Settings if you build for mobile platforms. [Edit -> Project Settings -> Player is the right path.]
Screen orientation is platform specific and only appears when you build for mobile platforms (Android, IOS...). You can set it as you like or you can use AutoRotation value as well - in that case the device will determine how to display your game.

Related

Google VR SDK stuck in portrait mode

I've built the app and compiled it with VR enabled and cardboard selected as my VR device. I can install and run it on my phone (Samsung S8) BUT the in game camera is stuck in portrait mode and the yew is inverted (turning my head left turns the camera right). I have scoured the internet but still can't find a way to fix this.
I've enabled VR in playersettings and added google cardboard as my VR.
I've also disabled portrait views under orientation.
I've set the camera as both a child and parent object.
I've built the app with both cardboard and daydream selected as the VR (and each individually) but still the same issue.
I've tried forcing different higher levels of API requirement
I have added and removed GvrEditorEmulator from the project and the GvrControllerMain and no luck.
I've even flipped the camera manually by a 180 degrees and this made the view be in landscape but in this case the pitch was inverted (when I look up the camera looks down) and I haven't found a way to resolve this.
In the editor view the screen looks fine, but every time I run it on my Android phone it force starts in portrait mode and the pitch or yew is inverted.
Is there a hidden option I need to switch, does anybody have more suggestions that I could try?
You can see what the app looks like when I hold the phone i portrait mode on the link bellow (the image breaks when I try to add it to the post for some reason).
https://imgur.com/a/o80NRe4
Its worth mentioning that I'm working with Unity version 2019 2.0b2 because any other version I tried would not detect my installed Android SDK and would not let me build the project. I've tried on multiple machines and always had that problem so I'm afraid of attempting an upgrade to a newer version would break my build ability.
This seems to be a known and reported issue for Google VR SDK for unity. Its been reported on their github page.
The only possible fix is reverting back to Unity 2018.3.14f1. I did this by exporting my v2019 project, then creating a new 2018.3.14f1 version project and importing the original into it. This rebuilds the project and should avoid conflicts if you're lucky.

Unity Standalone App: Resolution Scaling Issue (OSX)

I have developed a Mac-OSX standalone app in Unity3D (Scale with Resolution: 1920x1080). Most of the time I present the app on my laptop, connected to an external screen, which works pretty well.
But when I'm on the road and use the app on my laptop screen (1440x900), the UI's are all over the place...
I know, BUT is there a way to run the app in a 16:9 ratio (with black bars on the top and bottom), the same as I can do it in the Unity3D editor?
I don't want to go back and re-scale everything to a lower resolution, as this would be a crazy job :(
Is there any solution without re-doing it?
Cheers
Thanks, but sadly this didn't work for me. The problem is my Reference Resolution in the Canvas Scaler is already set to 1920x1080. To fix this, I have to lower the reference, but this means re-doing all the UI's.
However, I found a workaround, which is strange but working. I have set the Default Screen Resolution in Unity to 1920x1080 as in the image/link below.
Now the strange part :)
1. Start the app with the option key on an HD screen and set the resolution to 1920x1080.
2. Save and Quit
3. Now the app is scaled down to 16:9 and keeps everything in place.
This works as long as you don't start this app or any other Unity build, with the option key on a lower resolution screen. In this case it will scale everything back again. You can redo the steps 1-3 and it will work again.
Not sure if there is another way to do this, but at least I have kind of a solution.
Default Screen Resolution in Unity to 1920x1080
There are two things you should check; 'Resolution and Presentation' under 'Player Settings', and canvas scalers. I have being in a situation similar to yours, I had built an iOS application meant for the vertical orientation, but also wanted to test it on macOS, the application launched correctly in fullscreen mode looking like this (The top status bar was intentionally brought down to show the aspect ratio):
Instead of using black bars on the sides, it seems like that Unity simply used the colour of the canvas of the current scene to fill in the gaps. This was my settings to get this result:
Only the 16:10 ratio (MacBook Pro) was checked, but the application functions in the iPhone's vertical ratio, I did not have to manually rescale the canvas,I simply switched the build platform, this was allowed by the canvas scalers I have added onto every canvas with the following setting (UI Scale mode: Scale with screen size | Screen match mode: expand), this would allow the canvas to expand automatically and scale to any aspect ratio, without messing up the UI:
Hope this Helps!

Do we have to upload different resolutions icons in unity?

Android requires 5 different resolution of images and ios requires 3 different resolution of images during development.
Does unity requires different resolutions of images while building for android or ios?
The short answer is NO. But it's way more complicated than that.
On unity, you can always submit your icon once and it will resize to each required size on each platform you'd like to publish your app. You can see that on player settings. Build Settings > Player Settings > Icon. You can also submit your own custom icon for each platform selecting the checkbox "Override for ...", there you can submit different sizes for each platform.
Now comes the tricky part. During the last four years, I've published 7 games and I ALWAYS had problems with icons on iOS and XCode. When publishing your game to iOS, I never tested the cloud build but whenever you build your game to iOS locally, you'll be prompt with a Xcode file that you have to edit before building for profiling and archiving which will allow you to publish your game to iTunes Connect. This is the part where I constantly have problems. I didn't test the new 2017 version but before that, some required icon sizes were not filled correctly so you had to go and drag from your computer. It's better to be ready to, MAYBE, fill some icon sizes yourself.
Another thing you might notice is that on store listing, you might have problems with icon sizes too. For example: For your google play listing, you'll require a 512x512 icon. For your iTunes Connect, you'll require a 1024x1024 icon and for Windows Phone, much like apple, you'll require all sorts of icon sizes. The same goes for screenshots.
But TL:DR: For Unity, you can always submit your icon once and Unity will resize it for each platform and required size you need. You can check that under Build Settings > Player Settings > Icon

I wanted to make my canvas into portrait mode in unity

I already click on File -> Build Settings -> and switch to android platform since I'm developing a android game using unity, but unfortunately I wanted to it in portrait mode, can anyone help me? I'm new to unity ..
Look at the Game Window. You will find a drop-down button at the top-left corner of the window.
Click on the little "Plus" symbol and you will be able to add the desired format / resolution.
Current versions of Unity show individual resolution options, depending on your Player Settings!
(Go from Android to PC build, and you will get other options)

Wrong iPhone launch image displayed when iPhone app is launched on iPad

I have developed a straight iPhone/iPod Touch app.
A launch image is implemented for Retina displays as well as the lower resolution of the former generation devices.
Those images are displayed properly on the iPhone simulator as well as on several iPhone an iPod Touch devices.
However, since some days, when launched on an iPad (1) or iPad simulator one of the other images within the app is shown.
Apparently the image that is displayed wrongly, is one of two amongst ca. 70 images within the app. Those two images happen to be either
1. the first image in my xcode project groups hierarchy.
-or-
2. the first image in my project in alphabetical order.
I did not yet find a pattern of when 1. or 2. happens, so when the first image in the project's hierarchy of groups is taken or when the first in alphabetical order is taken. But it seems to be one of these two files only.
Any idea what I probably did wrong so that a wrong image is picked as launch image of this iPhone-only app whenever it is launched on an iPad?
Thanks in advance.
Cheers
Hermann
Try inserting an image named Default.png into Xcode. That's all, just drag it in. Xcode recognizes any picture named Default.png as the loading image. That should make it work.
To expand a little on Jack's answer - you can indeed use an image named Default.png which will automatically be used as a launch image for your app.
However,you can also customise the launch image for particular hardware and device orientations by using images of a particular size and name - for example, a 768x1004 pixel image named Default-Portrait~ipad.png added to your project will be automatically used as the launch image when you launch the app on an iPad in portrait orientation.
The use of these customised images is highly recommended, as it allows the launch image to be sized appropriately for the different shapes of screen (i.e. iPhone and iPad), and allows high resolution launch images to be used on Retina display devices.
For a list of these sizes and image names, see this page. The items of interest are the ones beginning with "Default"
All iPhone apps have a splash screen, or what Apple refers to as a “launch image”. It is the screen that is displayed immediately after you press your app’s icon on the home screen, while the app icons are sweeping away and your app is zooming into view.
Some apps opt not to display a splash screen and go for a black screen, which is the default behaviour when you create an app. Others display a wireframe of the app’s interface in order to look like it is loading faster. See Apple’s native apps such as Clock and Camera for good examples of this. The most common use of the splash screen (especially in games) is to present a company or game logo, as we do in Addicus:
Apple has made it so easy to set your splash screen that you don’t even need a single line of code to do it. Why, you don’t even need to change a setting. Here’s how to set your splash screen it in just 2 steps:
Add a file to your project’s Resource folder called Default.png.
There is no step 2. Take this time to reflect on how good life is.
And that’s it. Run your app and your splash screen will zoom into glorious view.
A couple of things to watch out for when working with splash screens:
Whatever image you give it will be scaled to fill the 320×480 resolution of the iPhone, so ideally you would use a 320×480-sized image.
If your iPhone app is running in landscape mode, you need to rotate the splash screen you use. For example, our splash screen is rotated 90 degrees to the right in the above image.
See more at: http://getsetgames.com/tag/launch-image/#sthash.GEXwuzsf.dpuf