2D Toolkit Forum
2D Toolkit => Support => Topic started by: Desttro on September 17, 2015, 02:36:20 pm
-
Hello,
I have sprite collection set by default to platform 2x, now I added 4x.
I have this script for change platform by resolution:
void Awake()
{
Application.targetFrameRate = 60;
if(Screen.width > 1136) {
tk2dSystem.CurrentPlatform = "4x";
}
else {
tk2dSystem.CurrentPlatform = "2x";
}
Debug.Log("CURRENT PLATFORM (main) : " + tk2dSystem.CurrentPlatform );
Debug.Log("Device data:");
Debug.Log("Screen resolution: " + Screen.width + " x " + Screen.height );
Application.LoadLevel("Menu");
}
Camera setup:
(http://petrsabrnak.eu/projekty/arma/camera.png)
When I have tried this to iPhone, all is fine, it look like this (same as editor):
(http://petrsabrnak.eu/projekty/arma/2x.png)
When I have tried this to iPad, it look bad - camera is still zoomed, not zoomed out (same as editor).
(http://petrsabrnak.eu/projekty/arma/4x.png)
How fix that please?
-
You need to add an override (fit vertical or horizontal, fit visible will work too)
-
I have this setup:
(http://petrsabrnak.eu/projekty/arma/override.png)
But it still shows in editor like this:
(http://petrsabrnak.eu/projekty/arma/4x.png)
-
Can someone help me please?
-
I've asked you some questions about your setup in the other post, please don't cross post.