I use Cesium in unity. When I need to open two scenes at the same time (there are two MainCamera), only the map of one scene is fully loaded at this time. How can I solve this problem? How do I replace the camera that renders the Cesium map with a custom camera? Thank you for your response.
Cesium for Unity currently uses Camera.main to drive tile selection. So the only way to change which camera is used, without modifying the plugin, is to change what Unity returns for this property. That can probably be done by manipulating, i.e., removing the
MainCamera tag from one object and adding it to another.
We’re interested in learning more about how people are using cameras, though, and ideas for how Cesium for Unity could better utilize your cameras.
Thanks for your response.
I need to control two cameras at the same time in a scene to view Cesium’s map by moving, rotating, etc. The maps seen by the two cameras are different according to the operation. I use a camera corresponding to a map to achieve .
At this time, I found that only one camera can display the map completely, and the other camera will only display the map based on the range of the previous camera.
Not sure if my description is clear, thanks again for your answer.
The parameters of both cameras are the same.
The following two pictures are different effects presented by the two cameras.
Your explanation makes sense. Currently you will need to modify the Cesium for Unity plugin in order to support multiple cameras. The code that collects the cameras is found here:
I wrote an issue for this:
Thanks again for your attention to this issue, I will try to change the code of the camera control to achieve this function.
To add to this. I’d like to use Cesium in VR/MR scenarios where people are gathering around a small portion of the map. E.g. consider people viewing New York Central Park that is sitting on a physical table. One camera is controlling the Cesium view, the other(s) are the headset cameras.
I think that scenario should already work ok, @paulio. You just want to make sure the “Cesium view” camera is tagged as the main camera, and the others are not.
Sadly no, both Cesium and MRTK only attach to the Camera Main Tag.