UniVRM
UniVRM copied to clipboard
[UniGLTF] Data of disabled GameObjects still gets exported while being not visible
I'm not sure if someone actually needs it to be like this. In this case consider this a Feature Request for an optional export setting to change the described behavior.
Environments (please complete the following information):
- UniVRM version:
0.108.0 - Unity version:
Unity-2022.1.20 - OS:
Windows 10
Describe the bug
When exporting an object at runtime to GLTF/GLB, the exporter includes all the disabled data in all child transforms. Therefore there is a lot of unused and invisible data in the model file. By excluding this data, the model size could be reduced significantly in a lot of cases.
This can be reproduced by following these steps:
- Export a 3D model that is comprised of multiple GameObjects below the parent transform which is passed to the gltfExporter
- Check the size of the exported GLTF/GLB
- Take the same model and disable some of the child GameObjects with 3D data in the hierarchy before exporting
- Export the model
- Compare the new model to the previously exported one. The new model is correctly missing the elements from the disabled GameObjects but is still exactly the same size as the model with no disabled elements.
GameObject を Export から除外する基準を確認する。
- activeSelf じゃなくて activeInHierarchy にするべき?