性能优化管理 PerformanceManager
性能优化管理是用于控制云渲染性能优化的工具,通过获取该管理器,用户可以方便地进行性能优化的控制和管理。 该工具的主要功能包括:
- 开启/关闭性能优化
我们将提供详细的使用指南和功能说明,帮助用户更好地使用该工具。
performanceManager
用户可以调用云渲染实例 cloud
上的 getPerformanceManager()
方法来获取 PerformanceManager
性能优化管理器。
ts
const performanceManager = await cloud.getPerformanceManager()
const performanceManager = await cloud.getPerformanceManager()
用户调用 cloud.getPerformanceManager()
后,performanceManager
会被自动挂载到当前 cloud
实例上。
ts
await cloud.getPerformanceManager()
const performanceManager = cloud.performanceManager
await cloud.getPerformanceManager()
const performanceManager = cloud.performanceManager
开启/关闭性能优化 | SourceOptimized
- 说明:开启、关闭性能优化
我们可以调用 PerformanceManager
上面的 SourceOptimized
方法来开启、关闭阿凡达功能。
- 参数说明
Name | Type |
---|---|
isStart | boolean |
调用示例:
ts
const performanceManager = await cloud.getPerformanceManager();
performanceManager.SourceOptimized(true);
const performanceManager = await cloud.getPerformanceManager();
performanceManager.SourceOptimized(true);