I was just testing my android app tonight when I found out that the app doesn't match the phone size.
I made the app specifically for my Android Phone ( SAMSUNG S8 ), with a resolution of 1440 x 2960, and yet when loading the app on the phone, it looks way bigger.
Any fixes to this?
set the Ui Scale Mode as Scale With Screen Size.
also, install the phone Devices simulator package to see the phone preview on Unity, It does not have to export your project just to see the preview
check this out
https://docs.unity3d.com/Packages/com.unity.device-simulator#2.2/manual/index.html
You could try to set the screen ratio. When I had this issue it was due to a ratio issue.
In the Player Settings (Ctrl+Shift+B), set the screen width and Height you needs.
In the Supported Aspect Ratio section, I chose Others.
From the upper-left corner of the game preview window.
Related
I am relatively new to Xamarin ios and am creating an application that
will work in both Landscape and Portrait for both iPhone and iPad.
I have been able to implement both Landscape and portrait on iPhone pretty fine by using a rotation callback method that will invoke a different view with the same layout but adjusted dimensions for the landscape version and on the landscape version I have the same to go back to portrait. This works okay but has some lag at times.
I'm not very sure about what is the right way to present two different UIs for different orientations. If anyone has any suggestions please let me know.
Now I have a list that holds values for Height and Width of the current device and I will devise this by the current device density like so:
maindisplayinfo.height / maindisplayinfo.density
and this gives me the current display dimensions I need. I use this to place my objects relative to a screen portion such as:
CGRect(0, Height * 0.30, Image.Bounds.Width, Image.Bounds.Height)
On rotation on Ipad, the display goes funny even though I have set dimensions correctly and my rotation callback triggers the different views. Not sure what is going on here.
But is there a certain way to do this sort of thing with iPad and iPhone?
I am creating an app that is going to be put onto a tablet that has a 7 in screen and a resolution of 1280x800. However in the case that we use the app on tablets that have a higher or lower resolution, I would like the entire app to adjust to it accordingly. Is there a way to make my app and all the tools on the page adjust to the resolution of any screen?
Have you tried VisualStateManager? Well, you can learn much about Universal Windows Platform at MVA
Here's the link : https://mva.microsoft.com/en-US/training-courses/windows-10-development-for-absolute-beginners-14541
You can use AdaptiveTrigger to resize or change the layout of your views this feature is only for UWP apps
https://www.microsoft.com/en-gb/developers/articles/week03aug15/designing-with-adaptive-triggers-for-windows-10/
If you are using Windows 8.1 you have 3 projects Windows 8.1(desktop) Windows phone 8.1(Phone) and shared.
You need to create a specific view for each platform with your custom layout .
Maybe if you need to detect the resolution and effective pixels to do something special
var bounds = Window.Current.Bounds;
double height = bounds.Height;
double width = bounds.Width;
With this information can modify your controls depending of the width or height of the screen.
Best Regards
I am using unity for develope to my android phone. I am trying to develope a 2D game. When I put new image(sprite) in my game i can see it fully in unity but when I uploaded the game to my phone, parts of the image are missing from the sides. How can I fit the images sizes on all phones?
I saw the answer for this question but for eclipes java and not unity C#.
In Unity 4.6 version, you can make you UI size adaptive:
Select the canvas where your UI resides
In the inspector, add a component called Canvas Scaler (in 4.6 beta, this is called Reference Resolution component)
Set the reference resolution to the native (or original size) of your sprite/background image
Make sure you choose the right "Screen Match Mode" if the phone's resolution is different.
That is it.
Now no matter how you resize the game view, your sprite can make best fit with it: either fit with the width or height, depending on the phone orientations and aspect ratios. In either case, however, you are guaranteed to see full image, rather than portion of it in your case. See the gif below:
Screen.width and Screen.height are the only unity specific methods you need.
Pass in height, width, and position information to your objects based on your screen size.
The harder part learning the gui.
If you need more help with syntax, take a look at unit's gui documentation and tutorials.
Use Screen.width and Screen.height to get the screen size of current device, then check your target phones screen aspect ratio:
For Window Phone, it's 5:3 and 16:9
iPhone: iPhone 3, 4 is 3:2, iPhone 5, 6, 6+ is 16:9
Android phone has many types.
After you get the that, make sure your sprites are designed in exact ratio for your target phones, and it'll be matched with screen.
i have recently started to develop apps for Windows Phone 8 after Windows Phone 7, the problem is with creating tiles, i am trying to use the simplest type (iconic tiles) just like we used to do in Windows Phone 7 opened the images from the assets and edited them from there, and modified the app manifest to select the images, but the tile is still showing white blank, i have searched deeply but there does not seem to be any tutorial about this
Make sure you are setting your images to Build Type of Content and that they are actually being included in your xap.
For a complete discussion about Tiles start: http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202948(v=vs.105).aspx
Iconic Tiles cannot be colored. They are monochromatic. That is why you got blank white image. The only shape on transparent background is used by Windows Phone to show such kind of tiles.
To get colored Tile you have to use Flip Template for it.
I am busy developing a windows mobile application that is targeted at WM6 , one of the features i need to use is the camera. In the emulator i can test the camera fine but the image is always black(fades between black and white). I need a way to provide the emulator with a image that i have already taken. At the moment to test i have to deploy the app to my physical device and this is slowing down the process alot.
During testing (on the emulaor) use the image picker instead of the camera.