Skip to content

Unity glTF 2.0 serialization using UnityEditor.JsonUtility

License

Notifications You must be signed in to change notification settings

isaveu/glTF-Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attention

All work has stopped in this repository and the newest fixes/additions can be found in

XRTK.Utilities.Gltf

glTF-Unity

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

Supported Extensions

  • KHR_materials_pbrSpecularGlossiness

FAQ

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.

To build a glTF-Object from json:

GltfObject gltfObject = GltfSerializationUtility.GetGltfObjectFromJson(json);

To build a glTF-Object from uri:

GltfObject gltfObject = GltfSerializationUtility.GetGltfObjectFromPath(uri);

To Import GlFT-Object:

await ImportGltf.ImportGltfObjectAsync(gltfObject);

To access built Gltf GameObject scene reference

gltfObject.GameObjectReference

About

Unity glTF 2.0 serialization using UnityEditor.JsonUtility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages