3D tile set not loading during runtime

Hi, I originally managed to make the tile set work during my initial set up. However I think I updated unity to a newer version and for some reason the tile set only works in the editor and doesn’t load at all during runtime. I’ve already updated the caesium package but this hasn’t worked either. Loading from google or ion servers seems to change anything.

Editor

Runtime

This is for a university project, if someone could help me ASAP that would much appreciated. Thanks.

Note that any work arounds such as preserving a tile set that is already in the editor even if its only one area would also work for me.

It’s hard to say what’s going wrong there, but my first guess is that the location of your aircraft is changing between Editor and Runtime. So the terrain is still displayed, but somewhere else. If you have a game object with a CesiumOriginShift component attached to it, try removing it.

Hello Kiyodio,

Hope you are doing well, I can that you have enabled Enable Frustum Culling and also the Update in Editor on your Cesium 3D Tileset component, and what Cesium does is that when you run you experience in unity or build, it tries to get the first Camera component that is active and enabled in the scene and tries to do frustum culling related to the frustum of that camera (i.e. view port of camera), so because it only loads the tiles that are visible in that camera frustum, it will ignore any other area anywhere in the your scene world.

It is a very common issue with how culling and rasterization differs from edtior view to runtime view, so to achieve what you want to achieve here, you can try these two solutions below:

  1. You can uncheck Enable Frustum Culling in your Cesium 3D Tileset component but beware that it can cause some performance issues since now it will try to load all the possible tiles from the tileset provided, so the whole tilemap would be visible just like in the scene view when not playing.
  2. You can switch between which camera you want to view from, so disable all the other cameras that are not being used currently, and if you want to use them then maybe try switching between cameras dynamically so the camera that is active should be its gameobject enabled in the scene and others should be off, and as soon as you turn on other camera which has higher priority then the frustum calculation would be according to that camera, so only the area visible by that camera will be shown.

Although you can really solve it in many many more ways, and amongst these I will recommend trying out second solution since it is better for performance as well, but it totally depends upon your needs, so feel free to use any or come up with your own solution.

I hope it helped!!!

Ps. This comment/reply is mainly for those who are still having this issue, and since I had the same issue my self as well today, and while searching for the solution I came accross this thread but sadly there wasn’t any solution anywhere on the internet as far as I could see, so I debugged it all myself and found out the problem itself and its solution, and I thought why not to share my experience so I just joined the cesium community, I hope it may help someone else in future.

Happy coding!
Sherry.

1 Like