Topic: Severe Performance Drop when using AdjustToScreen

I am on Unity 6.1.14 with Online Map 4.1.0.1

When I use the AdjustToScreen component, there is a severe performance issue (drops to ~5 FPS when loading or panning the map).
I tried it with UI Image or UI Raw Image.

I noticed there is no sample scene that uses the AdjustToScreen component (at least I didn't find any).

Any help greatly apreciated. Thanks!

Michael

Re: Severe Performance Drop when using AdjustToScreen

Hi.

This is due to the too high resolution of modern devices.
Ways to improve performance:
1. Use Tileset. It's much faster than drawing to a texture. If you want to map to a UI, the asset contains an example of how to display a Tileset to a UI.
2. If you still want to draw to texture, set Adjust To Screen / Half Size to ON.

Kind Regards,
Infinity Code Team.

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

Re: Severe Performance Drop when using AdjustToScreen

Drawing to a large texture is not the problem. I can have a 2048x1024 texture without any performance issues. The problem comes as soon as I add the AdjustToScreen component even if the screen is smaller than 2048x1024.
My workaround now is to have a texture that is much larger than the screen to allow to adjust to all possible aspect ratios. I would expect the AdjustToScreen component to increase performance.
The performance issue is also in the Editor on a high-end PC!

Re: Severe Performance Drop when using AdjustToScreen

Adjust to Screen dynamically changes the resolution of the map (in this case, the texture size), adjusting it to the screen size.
You can find out the actual texture size you have with Adjust to Screen in playmode.

Kind Regards,
Infinity Code Team.

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

Re: Severe Performance Drop when using AdjustToScreen

It's a major bug nevertheless. Steps to reproduce:

1) Create a 2D Map using your Wizard with the "Adjust to Screen" Option enabled
2) notice the severe performance issue even in the Unity Editor (only 1 frame per second rendered or so)

Re: Severe Performance Drop when using AdjustToScreen

This is not a bug.
I'll say it again: it's because your screen resolution is too high and, as a result, the resolution of the texture the map is drawn on is too high.

To fix the problem, use Tileset and/or Adjust to Screen / Half Size - ON.

Kind Regards,
Infinity Code Team.

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

Re: Severe Performance Drop when using AdjustToScreen

To say it again: The resolution is not too high! I even have solid FPS in the Editor and also on mobile devices when using a 4096x4096 texture without AdjustToScreen. And the performance drops to 1 FPS in the Editor. Not sure what else to say.

Using my own script now to adjust to the screen resolution correctly (without performance issues).
I wonder what this user support forum is about if you don't seriosuly listen to user feedback.

Re: Severe Performance Drop when using AdjustToScreen

I apologize if what I wrote above looked like I didn't care about the users of my assets and their problems.
I can assure you that is not true.

I found and fixed the problem.
Thank you for reporting it.
It's not in Adjust to Screen, it's much deeper than that.
It's just that this script was triggering it in some cases.
Next week, most likely Tuesday or Wednesday, I will release a new version that will fix this problem.

Kind Regards,
Infinity Code Team.

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

Re: Severe Performance Drop when using AdjustToScreen

Thanks Alex! :-)