All work has stopped in this repository and the newest fixes/additions can be found in
Unity glTF 2.0 serialization using UnityEditor.JsonUtility
.
- Import Asset
- Import asset at runtime
- Custom asset importer for editor
- .gltf file extension
- .glb file extension
- Json string
- Construct GameObject from GltfObject Data
- Apply texture to GameObject
- Apply PBR Settings to material
- Import skins
- Import Animations
- Import Cameras
- Apply extension properties to imported asset.
- Export Asset
- Export asset at runtime
- Export asset from editor
- .gltf file extension
- .glb file extension
- KHR_materials_pbrSpecularGlossiness
To load gltf or glb files at runtime without a custom shader, you'll need to make sure that the standard shader is included in your final build with each of the required variants compiled and located either in your resources folder, or used in your scene. For more information check out the Unity Docs explaining how to access shader properties at runtime.
GltfObject gltfObject = GltfSerializationUtility.GetGltfObjectFromJson(json);
GltfObject gltfObject = GltfSerializationUtility.GetGltfObjectFromPath(uri);
await ImportGltf.ImportGltfObjectAsync(gltfObject);
gltfObject.GameObjectReference