1 (edited by emmanuel.g.blanchard 2021-01-15 22:41:15)

Topic: Tilesets on UI - no interactivity when built for windows

Hello, I found the video you published for properly using tileset maps on UI.
It works really smoothly when using it with play from the Unity Editor. But when i tried to built for windows today (both 32 and 64b), there is no more interactivity. No ability to move the map, to zoom, to click on markers.

I tried redo a very basic example from step 1
- creating a new project,
- following strictly the video and doing nothing more in my scene. Structur
The result was the same. It works well when played from the editor but no interactivity on windows.

Any idea?

PS: Unity version 2020.2.1f1 and OnlineMaps 3.7.8

Re: Tilesets on UI - no interactivity when built for windows

Hello.

This is a bug in the Raw Image Touch Forwarder.
The modified script is attached.
Replace this file in your project.

Post's attachments

Attachment icon OnlineMapsRawImageTouchForwarder.cs 4.05 kb, 90 downloads since 2021-01-16 

Kind Regards,
Infinity Code Team.

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

Re: Tilesets on UI - no interactivity when built for windows

This solved the issue. As always thanks for the quick fix.

4 (edited by emmanuel.g.blanchard 2021-01-17 02:54:32)

Re: Tilesets on UI - no interactivity when built for windows

Follow up issue.

I ve built the project on Windows. Works as expected.
But when working on the same project for mac, the map rendering is different.
My setup is the following.
- I create a 1024x1024 renderTexture
- it is on a rawImage set to be squared (aspectRatioFitter with ratio of 1 and height controls width) in a 1080x1920 portrait canvas
- The online maps width and height are set to 512
- The tileset size in scene is set to 1024x1024.

This way on window, i can have a decent resolution while keeping city names big enough.
However on mac, the renderTexture only takes the middle 512x512 square of the RawImage  (the issue appears in the editor as well as in build)


See image : Mac on the left, Windows (expected behaviour) on the right)

Post's attachments

Attachment icon MacVsPC.png 619.13 kb, 58 downloads since 2021-01-17 

Re: Tilesets on UI - no interactivity when built for windows

Compare settings of components step by step.
Somewhere you have different values.
This problem could be in:
- Map / Transform / Scale.
- Map / Camera Orbit / Distance.
- Map / Tileset / Size In Scene.
- (If you are not using Camera Orbit) Camera / Transform / Position.

Besides, it could be somewhere else.

Kind Regards,
Infinity Code Team.

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

6 (edited by emmanuel.g.blanchard 2021-01-17 20:04:57)

Re: Tilesets on UI - no interactivity when built for windows

Both versions are synchronized with collaborate. So codes, prefabs and their settings are exactly the same.

Yet you are sorta right.
- At runtime, the map camera Y location on Mac is +1000 (~2000 instead of ~1000)
In Mac editor, I can fix the visualization at runtime, by putting the Y value to 1000 but in order to modify it, i need to disable the Camera orbit script. I guess the issue is there. As said before, the setting of this component is exactly the same in both mac and pc (I didn't change anything : average center, 1000, 80, rot to 0 0, speed to 1 1)

I can put a script somewhere to fix it but i doubt that s a normal behaviour.

Edit. The issue is definitely with camera orbit. If, at runtime, i fix the visualization with the 2 actions I said before, and I enable CameraOrbit again afterward, the visualization becomes inappropriate again.

Re: Tilesets on UI - no interactivity when built for windows

Interesting, and very strange.
I've never seen anything like it.
On Mac: try setting Camera Orbit / Distance - 500, and then set it back to 1000.
Perhaps this is some kind of script serialization problem.

Kind Regards,
Infinity Code Team.

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

8 (edited by emmanuel.g.blanchard 2021-01-18 01:39:37)

Re: Tilesets on UI - no interactivity when built for windows

if I put 500 in the camera orbit of the prefab, the value in the instance of the mac version is ~1000. I tried another value : 700... and the value in the instance was ~1400
There s a  x2 somewhere...
i don't see how it could come from my scripts or prefab settings. As said, it s the same project synchronized on 2  computers. and settings are the same.

Edit: So if someone else encounters the same issue, i have a dirty-yet-easy fix

#if UNITY_STANDALONE_OSX
OnlineMapsCameraOrbit.instance.distance /=2;
#endif

Then the visualization is the same on mac and pc.

Edit2:This indeed must come from something in my project. I created an empty project with just the map, and synchronized it between OS. It doesn't reproduce the visualization issue. For now i have my fix. I will investigate when i have time and if it s not too silly, i will keep you posted. Sorry for the trouble.

9 (edited by emmanuel.g.blanchard 2021-01-25 20:39:56)

Re: Tilesets on UI - no interactivity when built for windows

Problem apparently found and fixed.

The observed behavior was actually not due to Mac vs Win, but rather to changes in Display resolution. It happened similarly in the editor when testing different display simulation (which I should have tested earlier).

The origin of the behaviour was that I had the map within a prefab, and this led it to be put in a UI hierarchy, which led it (map? camera? texture?) to be influenced by different Display resolutions.

Changing my prefab instantiation strategy to have the map object created outside of the UI hierarchy seems to have fixed the problem.

Re: Tilesets on UI - no interactivity when built for windows

Tileset is not UI element and cannot be used inside Canvas.
This can cause any problems, for example, as in your case.

Kind Regards,
Infinity Code Team.

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