Topic: Map in Safe Area
Hi,
I resize my map to the full size of the screen safe area but it still occupies space outside the safe area (see attached)
Is there any way to control this area without resorting to placing a ui panel at the top and loosing the phone info bar? Or is this all because you need to have a margin of map outside the display?
private void ResizeMap()
{
screenWidth = (int)Screen.safeArea.width;
screenHeight = (int)Screen.safeArea.height;
int tileSize = 256;
mapScaledHeight = Mathf.Min(defaultScreenHeight, screenHeight);
mapScaledWidth = Mathf.Min(defaultScreenWidth, screenWidth);
int mapWidth = mapScaledWidth / tileSize * tileSize;
int mapHeight = mapScaledHeight / tileSize * tileSize;
if (mapScaledWidth % tileSize != 0) mapWidth += tileSize;
if (mapScaledHeight % tileSize != 0) mapHeight += tileSize;
OnlineMapsTileSetControl.instance.Resize(mapWidth, mapHeight);
OnlineMapsCameraOrbit.instance.distance = Mathf.Min(mapScaledHeight, mapScaledWidth) * camDistance;
}