|
|
1 năm trước cách đây | |
|---|---|---|
| .. | ||
| Materials | 1 năm trước cách đây | |
| Plugins | 1 năm trước cách đây | |
| Scripts | 1 năm trước cách đây | |
| .DS_Store | 1 năm trước cách đây | |
| .editorconfig | 1 năm trước cách đây | |
| .gitignore | 1 năm trước cách đây | |
| GLTFUtility.asmdef | 1 năm trước cách đây | |
| GLTFUtility.asmdef.meta | 1 năm trước cách đây | |
| LICENSE.md | 1 năm trước cách đây | |
| LICENSE.md.meta | 1 năm trước cách đây | |
| Materials.meta | 1 năm trước cách đây | |
| Plugins.meta | 1 năm trước cách đây | |
| README.md | 1 năm trước cách đây | |
| README.md.meta | 1 năm trước cách đây | |
| Scripts.meta | 1 năm trước cách đây | |
| package.json | 1 năm trước cách đây | |
| package.json.meta | 1 năm trước cách đây | |
Allows you to import and export glTF files during runtime and in editor. glTF is a new opensource 3d model transmission format which supports everything you'll ever need from a format in Unity. Read more about glTF here
Focusing on simplicity and ease of use, GLTFUtility aims to be an import-and-forget solution, keeping consistency with built-in functionality.
Using Unity Package Manager (Help)
"com.siccity.gltfutility": "https://github.com/siccity/gltfutility.git"
Get Newtonsoft.JSON from one of these sources
"com.unity.nuget.newtonsoft-json": "2.0.0-preview",Clone GLTFUtility by itself or as a submodule
git clone git@github.com:Siccity/GLTFUtility.gitgit submodule add git@github.com:Siccity/GLTFUtility.git Assets/Submodules/GLTFUtility
Get Newtonsoft.JSON from the asset store
Download GLTFUtility-master.zip and extract to your project assets
System
Spec
Extensions
ArgumentNullException: Value cannot be null in build but not in editor.
// Single thread
using Siccity.GLTFUtility;
void ImportGLTF(string filepath) {
GameObject result = Importer.LoadFromFile(filepath);
}
// Multithreaded
using Siccity.GLTFUtility;
void ImportGLTFAsync(string filepath) {
Importer.ImportGLTFAsync(filepath, new ImportSettings(), OnFinishAsync);
}
void OnFinishAsync(GameObject result, AnimationClip[] animations) {
Debug.Log("Finished importing " + result.name);
}
To ensure that Unity includes the GLTFUtility shaders in builds, you must add these shaders to the 'Always Included Shaders' list.