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;
        }
Post's attachments

Attachment icon Top.png 46.56 kb, 48 downloads since 2019-05-22 

Re: Map in Safe Area

Hello.

No, there is no way to control it.
Just add a white rectangle (image) on UI where the phone bar is located.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.