Runtime glTF 2.0 Loader for Unity3D
Unity3D library for importing and exporting glTF 2.0 assets.
| Editor | Runtime | |
|---|---|---|
| Import | ✅ | ✅ |
| Export | ✅ | ✅ |
UnityGLTF doesn't have any native dependencies (pure C#) and thus works on all platforms that Unity supports. This includes WebGL import and export.
The library is designed to be easy to extend with additional extensions to the glTF specification. Both import and export allow attaching custom plugins and callbacks and can be heavily modified to fit into specific pipelines. Many glTF extensions are supported.
You can install this package from the Needle Package Registry with a one-click installer:
You can also install this package from git, compatible with UPM (Unity Package Manager).
Window > Package Managerhttps://github.com/KhronosGroup/UnityGLTF.gitNote: If you want to target a specific version, append
#release/<some-tag>or a specific commit to the URL above. Example:https://github.com/KhronosGroup/UnityGLTF.git#release/2.14.1.
Please use Long-Term Support versions of Unity (2021.3+, 2022.3+, 6000.0+).
Recommended:
HDRP:
Legacy:
Note: Issues on non-LTS Unity versions (not on 2021.3, 2022.3, 6000.0...) will most likely not be addressed. Please use LTS (Long-Term Support) versions where possible.
A separate glTF implementation for Unity, glTFast, is available from the Unity Registry.
glTFast being supported by Unity means, in a nutshell, that it sticks to standards pretty strictly and can't easily ship non-ratified extensions or experimental features that work for the majority, but not all, of users.
KHR_animation_pointer, KHR_audio, and KHR_materials_variants.glTFast and UnityGLTF can coexist in the same project; you can for example use glTFast for import and UnityGLTF for export.
For imported assets, you can choose which importer to use with a dropdown.
glTFast import has precedence if both are in the same project. See also Default Importer Selection.
The lists below are non-conclusive and in no particular order. Note that there are gaps where features could easily be supported for im- and export but currently aren't. PRs welcome!
KHR_node_hoverability KHR_node_selectability com.unity.cloud.draco)com.unity.cloud.ktx)com.unity.meshopt.decompress)This plugin allows you to export VisualScripting Graphs as KHR_interactivity graphs in glTF files.
A wide range of nodes are supported for export. Additionally, many features that Unity's Visual Scripting has, but that are lacking in the KHR_interactivity extension, are "flattened" on export into compatible graph logic. For example, scoped variables get exported as variables with unique names, so that there are no conflicts in the exported graph. This allows a lot of flexibility for building complex graphs in the Unity editor, while still being able to export to a glTF file.
No open issues yet, or sync has not completed.