Texture sizes are 10x bigger in iOS builds from 6000.0.24f1 vs 2023.2.20f1

未关闭
#795 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp, ios, unity

调研方向

从 MemoryRepro.zip、DamagedHelmet.glb 模型和 UnityGLTF importer 开始,然后在 Apple Silicon Mac 上使用 Unity 2023.2.20f1 和 6000.0.24f1 重现 iOS 构建。为两个构建捕获 Memory Profiler 快照并比较纹理分配;完成的标准是解释并修正近 10 倍的纹理大小回归,同时不影响较早构建的行为。

由索引模型根据 Issue 内容生成。

描述

Describe the bug 💬

This project exported and ran fine in Unity 2023.2.20f1 on iOS running on an iPad Pro - when I updated it to Unity 6000.0.23f1 and also 6000.0.24f1, I noticed the allocated size of textures in the build in the memory profiler are nearly 10x the size of the textures in the build from Unity 2023.2.20f1.

I have cross checked this doesn't happen with textures linked to obj, dae or fbx files imported into Unity and this only is happening with .glb files.

I have a small repro project here using the DamagedHelmet.glb example file from the Khronos GLTF sample models repo where I opened it in Unity 2023.2.20f1, built to test then opened it in Unity 6000.0.24f1 without changing anything built and tested it to cross reference this - See size differences of the DamagedHelmet.glb textures.

Unity 2023.2.20f1
Screenshot 2024-10-29 at 2 29 42 pm

Unity 6000.0.24f1 LTS
Screenshot 2024-10-29 at 2 29 51 pm

Steps to reproduce 🔢
  1. Download the attached project from the repro files below, open in Unity 2023.2.20f1 as build target iOS on Silicon Mac Editor (not intel)
  2. On Models > DamagedHelmet, ensure UnityGLTF is the importer for the model
  3. Build and run it on iOS to a device like an ipad Pro as development build with auto link profiler on
  4. In Memory Profiler, grab a memory snapshot of the running build
  5. Repeat the steps above with Unity 6000.0.24f1 as build target iOS on Silicon Mac Editor (not intel)
  6. Compare the memory snapshots
Files to reproduce the issue ♻

MemoryRepro.zip

Editor Version 🎲

6000.0

Render Pipeline and version

URP 16.0.6

UnityGLTF Version

2.14.0 & 2.14.1 tested

Operating System 👩‍💻

macOS, iOS

When does this problem happen?
  • Editor Import
  • Runtime Import
  • Editor Export
  • Runtime Export
Additional Info 📜

No response

Validations 🩹
主要语言
C#
星标
2.3k
派生
539
平均合并
3 天 15 小时
30 天内合并 PR
2

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

KhronosGroup/UnityGLTF 的其他 Issue

查看 KhronosGroup/UnityGLTF 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。