Very laggy on Android

I’m going crazy, I don’t know how to optimize :worried:

You’ll have to tell us a lot more about your project before we can help you figure out what’s happening. Some questions to get started:

  1. Is the Cesium for Unreal Samples project also very slow on your Android device, or only your own project?
  2. What sort of Android device is it?
  3. What tileset(s) are you rendering?
  4. Your draw calls, triangles, and vertices are all very low. Can you get the Unreal profiler to tell you any more about what is taking so much rendering time?

1.Using Cesium for Unity
2.Android device is Huawei mate 40pro
3,4 Most settings are default

I used the CesiumTileExcluder you mentioned before, and set the Size to 100100100

1.Using Cesium for Unity

Right, sorry, I meant: is the Cesium for Unity Samples project also very slow on your Android device, or only your own project?

3,4 Most settings are default

There’s no “default” tileset. So I still need to know what tileset you’re using. Also, if only “most” settings are default, it’s useful to hear about the ones that aren’t.

I used the CesiumTileExcluder you mentioned before, and set the Size to 100 *100 * 100

Do you mean the size of the box collider? Is the performance better if you remove the tile excluder?

1.yes, unity sample project, packaging is slow on android
The tileset used should be yours

Yes, I only let it show the range of 100, but the FPS is still very low

@han_wang I’m trying to help, but you’ll need to work with me if we’re going to get to the bottom of this, not just give me the briefest possible answers.

Your last screenshot finally tells me what I wanted to know - the tileset is asset ID 1, which is Cesium World Terrain. I regularly use that tileset on my Pixel 6 Pro, which I believe has similar specs to your Huawei Mate 40 Pro, and get pretty decent performance. Do you have any Raster Overlays attached? Perhaps a Cesium ion Raster Overlay with asset ID 2 (Bing Maps)? What do the settings look like there?

You said “yes, unity sample project, packaging is slow on android”. I assume you mean that the game is slow after it’s packaged, not that the packaging itself is slow. Can you quantify that? Which scenes are you testing? What sort of FPS range are you seeing?

What version of Cesium for Unity are you using? Did you build it itself, or install it from our package registry?

Using version 1.4.0 of Cesium,Download to Unity from the registration inside the Unity package manager。

Without any additions, I loaded the terrain into the scene through Cesium’s Hierarchy window
I have now controlled the visible range within 100, and the FPS packaged on Android is between 5-18. When the camera is facing the ground, the FPS is the lowest, only 3-7

Maybe I should try another tileset, but I don’t think that’s the main reason

Can I have a look at your Cesium World Terrain setup?

My Cesium World Terrain setup is Scene 1 of the Cesium for Unity Samples project.

How are you measuring the FPS on Android?

I am using a Unity FPS prefab package

Sorry, I don’t know its logic, but the lag is very obvious

Can you share your prefab package? I’d like to measure my own frame rate, and don’t know an easy way to do that.

I use this one, it’s completely free, after importing into Unity, you just need to put the LiteFPSCounter prefab into the scene

Thanks, that works nicely.

Looks like I’m seeing frame rates not too different from yours. I’m not quite sure why they’re so low. On Oculus devices, we’ve noticed that the built-in render pipeline seems to perform much better than URP, but switching to built-in didn’t help here.

So we’ll need to do some investigating. If you make any progress in your own investigations in the meantime, please let me know!

I wrote an issue to track this:

Thank you very much.