Topic: OnHoverExample does not work when multiple camera exist

As the topic, my scene has 3 different camera's and the OnHoverExample does not work when I add the script to the Online map. I tried tagging all 3 of my camera as "MainCamera" & only making 1 of the camera that is viewing the Map as "MainCamera". None of these work, please enlighten me, thank you!

Re: OnHoverExample does not work when multiple camera exist

Hello.

You cannot have all cameras tagged Main Camera.
It doesn't work that way.
Unity assumes that there is only one Main Camera.

By default, the map also works with only one camera.
If you need, you can override this behavior using Online Maps API.
But I can't imagine a situation where you need to simultaneously display three views of the same map at the same time.

Kind Regards,
Infinity Code Team.

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

Re: OnHoverExample does not work when multiple camera exist

As shown in the file, there are 3 windows right now, the 1st window holding the main UI and the 2nd/3rd window will appear depending on the user's input. The camera that is pointing towards the 2nd and 3rd windows will only be created when the window is created. The online map is instantiated in the scene already. I tried making either the 2nd camera or the 1st camera the only MainCamera but it does not work. Probably due to the result of the 2nd window shown in the 1st window. I will try to figure it out, thanks for the reply!

Post's attachments

Attachment icon explanation.png 23.66 kb, 54 downloads since 2021-03-19 

Re: OnHoverExample does not work when multiple camera exist

As far as I understood from your screenshot, only the second camera draws a map.
The first camera draws only an image (most likely Render Texture), which render the second camera.
See Tileset On UI example scene to understand how to configure it correctly.

Kind Regards,
Infinity Code Team.

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