Override the mipmap level of a texture
Preload mipmap levels
If you enable a camera at runtime, mipmap streaming needs time to stream the mipmap levels into memory.
You can use texture preloading to prevent this. Do the following:
- Add a Streaming Controller component to the disabled camera. For more information about this component, refer to Configure mipmap streaming.
- Call the StreamingController.SetPreloading API on the camera to preload the mipmap levels.
Use StreamingController.CancelPreloading to cancel preloading.
You can use the following APIs after you enable preloading:
If these APIs return values that indicate Unity has finished preloading, you might need to wait a few frames before you enable the camera to make sure preloading has finished.
Override the mipmap level of a texture
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。