Unity游戏提交苹果遭拒:启动首帧耗时超900ms排查求助
苹果平台游戏启动崩溃排查:首帧Other区域耗时超900ms问题
- 提交至苹果平台的游戏因启动崩溃被拒,使用Unity Profiler调试后发现首帧Other区域耗时超900ms,无法定位具体耗时的脚本及修复方案。
- 曾尝试编写
lagHandler脚本异步分批激活GameObject,代码如下:
using System.Collections; using System.Collections.Generic; using UnityEngine; public class lagHandler : MonoBehaviour { public List<GameObject> objectsToActivate; public float initialDelay = .5f; // Initial delay in seconds void Start() { StartCoroutine(ActivateObjects()); } IEnumerator ActivateObjects() { yield return new WaitForSeconds(initialDelay); // Wait before starting activation foreach (GameObject obj in objectsToActivate) { obj.SetActive(true); // Activate the object yield return null; // Wait one frame before activating the next object } } }
- 该脚本仅能分散后续对象的加载压力,但首帧耗时仍居高不下。
- 已将场景顶点数降至约50K,关闭画布动画,问题依旧存在。
- 后续测试中禁用所有GameObject(包括
lagHandler)后,首帧耗时仍超900ms,怀疑问题出在Player Settings,但无法定位具体设置项。

内容的提问来源于stack exchange,提问作者Prograbit
相关产品推荐
相关产品推荐

