KhronosGroup / KhronosGroup/UnityGLTF
Texture sizes are 10x bigger in iOS builds from 6000.0.24f1 vs 2023.2.20f1
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 536
- PR merge metrics
- No merged PRs in 30d
Description
### 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

Unity 6000.0.24f1 LTS

### 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](https://github.com/user-attachments/files/17558677/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
- [X] Runtime Export
### Additional Info 📜
_No response_
### Validations 🩹
- [X] I have [searched existing issues](https://github.com/KhronosGroup/UnityGLTF/issues): no issue already exist that reports the same problem.
- [X] I follow the [Code of Conduct](https://www.khronos.org/about/code-of-conduct)
- [X] I provided a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), including files when necessary.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with MemoryRepro.zip, the DamagedHelmet.glb model, and the UnityGLTF importer, then reproduce the iOS builds in Unity 2023.2.20f1 and 6000.0.24f1 on an Apple Silicon Mac. Capture Memory Profiler snapshots for both builds and compare texture allocations; done means explaining and correcting the nearly 10x texture-size regression without affecting the earlier build behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, ios, unity
- Domain
- mobile-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100