[![Discord](https://img.shields.io/discord/361769369404964864.svg)](https://discord.gg/qgPrHv4)
[![GitHub issues](https://img.shields.io/github/issues/Siccity/GLTFUtility.svg)](https://github.com/Siccity/GLTFUtility/issues)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Siccity/GLTFUtility/master/LICENSE.md)
## GLTFUtility
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](https://www.khronos.org/gltf/)
![2019-04-01_00-46-27](https://user-images.githubusercontent.com/6402525/55296304-b2aa5880-5417-11e9-89a8-78ab540dc126.gif)
![image](https://user-images.githubusercontent.com/6402525/55296353-7297a580-5418-11e9-8e76-5078680ee0d3.png)
![image](https://user-images.githubusercontent.com/6402525/55296436-bd65ed00-5419-11e9-9723-31225b99450b.png)
### What makes GLTFUtility different?
Focusing on simplicity and ease of use, GLTFUtility aims to be an import-and-forget solution, keeping consistency with built-in functionality.
### Installation
<details><summary>Using Unity Package Manager (<a href="https://docs.unity3d.com/Manual/upm-git.html">Help</a>)</summary>
1. `"com.siccity.gltfutility": "https://github.com/siccity/gltfutility.git"`
</details>
<details><summary>Using git</summary>
1. Get Newtonsoft.JSON from one of these sources
* Official upm package: `"com.unity.nuget.newtonsoft-json": "2.0.0-preview"`,
* Unofficial git repo: https://github.com/jilleJr/Newtonsoft.Json-for-Unity
2. Clone GLTFUtility by itself or as a submodule
* Clone into your assets folder `git clone git@github.com:Siccity/GLTFUtility.git`
* Add repo as submodule `git submodule add git@github.com:Siccity/GLTFUtility.git Assets/Submodules/GLTFUtility`
</details>
<details><summary>Manual download</summary>
1. Get [Newtonsoft.JSON](https://assetstore.unity.com/packages/tools/input-management/json-net-for-unity-11347) from the asset store
2. Download [GLTFUtility-master.zip](https://github.com/Siccity/GLTFUtility/archive/master.zip) and extract to your project assets
</details>
[Important notice](https://github.com/Siccity/GLTFUtility#Important-shader-note)
### Features
*System*
- [x] Editor import
- [ ] Editor export
- [x] Runtime import API
- [ ] Runtime export API
- [x] GLTF format
- [x] GLB format
- [x] Multithreading
- [x] URP [#75](https://github.com/Siccity/GLTFUtility/issues/75)
- [ ] HDRP [#73](https://github.com/Siccity/GLTFUtility/issues/73)
- [ ] LWRP
*Spec*
- [x] Static mesh (with submeshes)
- [x] UVs (up to 8 channels)
- [x] Normals
- [x] Tangents
- [x] Vertex colors
- [x] Materials (metallic/specular, opaque/mask/blend)
- [x] Textures (embedded/external)
- [x] Remote textures (during async only)
- [x] Rig
- [ ] Avatar/Mask [#70](https://github.com/Siccity/GLTFUtility/issues/70)
- [x] Animations (multiple)
- [x] Morph targets (with experimental names)
- [x] Cameras
*Extensions*
- [x] KHR_texture_transform (partial support)
- [x] KHR_materials_pbrSpecularGlossiness
- [ ] KHR_lights_punctual [#25](https://github.com/Siccity/GLTFUtility/issues/25)
- [x] KHR_draco_mesh_compression [#27](https://github.com/Siccity/GLTFUtility/issues/27) WARNING: Said to cause issues on WebGL.
- [x] KHR_mesh_quantization
### Known issues
* `ArgumentNullException: Value cannot be null` in build but not in editor.
* This is most likely due to shaders being stripped from the build. To fix this, add the GLTFUtility shaders to the Always Included Shaders list in Graphic Settings.
* Draco compression does not work on iOS and UWP
* More info on [#133](https://github.com/Siccity/GLTFUtility/issues/133)
### Runtime import API
```cs
// Single thread
using Siccity.GLTFUtility;
void ImportGLTF(string filepath) {
GameObject result = Importer.LoadFromFile(filepath);
}
```
```cs
// 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);
}
```
### Important shader note
To ensure that Unity includes the GLTFUtility shaders in builds, you must add these shaders to the 'Always Included Shaders' list.
1. Open Edit -> Project Settings
2. Open Graphics
3. Scroll to Always Included Shaders
4. Under Size, increase the value by 4 and hit Enter.
5. In the Project panel, navigate to Packages/GLTFUtility/Materials/Built-in.
6. In this directory are 4 .shader files.
7. Drag and drop each of the 4 files into one of the 4 newly created rows in Always Included Shaders.
没有合适的资源?快使用搜索试试~ 我知道了~
unity里使用gltf格式模型的插件,安装后可以使用gltf格式模型
共162个文件
meta:89个
cs:39个
ds_store:6个
需积分: 5 13 下载量 112 浏览量
2023-03-24
11:51:33
上传
评论
收藏 3.56MB ZIP 举报
温馨提示
unity里使用gltf格式模型的插件,安装后可以使用gltf格式模型
资源推荐
资源详情
资源评论
收起资源包目录
unity里使用gltf格式模型的插件,安装后可以使用gltf格式模型 (162个子文件)
libdraco.a 6.55MB
libdracodec_unity.a 62KB
GLTFUtility.Editor.asmdef 552B
GLTFUtility.asmdef 327B
Dracodec.asmdef 291B
GLTFAccessor.cs 20KB
GLTFMesh.cs 16KB
Importer.cs 15KB
DracoMeshLoader.cs 13KB
GLTFUtilityDracoLoader.cs 13KB
GLTFMaterial.cs 12KB
GLTFAnimation.cs 11KB
GLTFNode.cs 7KB
GLTFAssetUtility.cs 5KB
GLTFImage.cs 4KB
GLTFSkin.cs 3KB
BufferedBinaryReader.cs 3KB
GLTFBuffer.cs 3KB
ShaderSettingsDrawer.cs 3KB
ShaderSettings.cs 2KB
Enums.cs 2KB
GLTFTexture.cs 2KB
GLTFBufferView.cs 2KB
ColorConverter.cs 2KB
KHR_texture_transform.cs 1KB
Exporter.cs 1KB
GLTFPrimitive.cs 1KB
Extensions.cs 1KB
Vector2Converter.cs 1KB
Matrix4x4Converter.cs 1KB
GLTFCamera.cs 1KB
GLTFImporter.cs 1KB
QuaternionConverter.cs 1KB
GLBImporter.cs 1KB
TranslationConverter.cs 1002B
Vector3Converter.cs 926B
GLTFObject.cs 849B
GLTFAsset.cs 841B
EnumConverter.cs 806B
ImportSettings.cs 806B
AnimationSettings.cs 761B
GLTFProperty.cs 554B
GLTFScene.cs 356B
GLTFExtras.cs 329B
dracodec_unity.dll 395KB
dracodec_unity.dll 221KB
dracodec_unity.dll 214KB
dracodec_unity.dll 168KB
dracodec_unity.dll 157KB
dracodec_unity 1.09MB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.editorconfig 133B
.gitignore 267B
package.json 271B
README.md 5KB
README.md 4KB
LICENSE.md 1KB
libdracodec_unity.so.meta 2KB
libdracodec_unity.so.meta 2KB
dracodec_unity.dll.meta 2KB
dracodec_unity.dll.meta 2KB
dracodec_unity.dll.meta 2KB
dracodec_unity.dll.meta 2KB
dracodec_unity.dll.meta 1KB
libdracodec_unity.a.meta 1KB
libdraco.a.meta 1KB
dracodec_unity.bundle.meta 633B
Standard (Specular).shadergraph.meta 285B
Standard Transparent (Specular).shadergraph.meta 285B
Standard Transparent (Metallic).shadergraph.meta 285B
Standard (Metallic).shadergraph.meta 285B
Extensions.cs.meta 285B
GLTFAccessor.cs.meta 285B
GLTFSkin.cs.meta 285B
GLTFAsset.cs.meta 285B
GLTFObject.cs.meta 285B
GLTFAnimation.cs.meta 285B
GLTFBufferView.cs.meta 285B
GLTFBuffer.cs.meta 285B
GLTFNode.cs.meta 285B
GLTFPrimitive.cs.meta 285B
GLTFScene.cs.meta 285B
GLTFMesh.cs.meta 285B
GLTFImporter.cs.meta 285B
GLBImporter.cs.meta 285B
GLTFAssetUtility.cs.meta 285B
DracoMeshLoader.cs.meta 243B
GLTFUtilityDracoLoader.cs.meta 243B
Exporter.cs.meta 243B
Enums.cs.meta 243B
GLTFProperty.cs.meta 243B
GLTFMaterial.cs.meta 243B
GLTFTexture.cs.meta 243B
GLTFImage.cs.meta 243B
GLTFExtras.cs.meta 243B
共 162 条
- 1
- 2
资源评论
鸿雁高飞
- 粉丝: 3
- 资源: 174
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于keras+fasterRCNN,在VOC格式的口罩数据集上训练,检测人群中有无戴口罩python源码+模型
- 基于opencv+qt5机器视觉的传统缺陷检测, 即采用标准图片和待测图片进行pixel to pixel的XOR操作源码+文档
- 管道内检测缺陷数据库管理系统源码+文档说明+sln
- 毕业设计-低功耗STM32F411开发板(原理图+PCB源文件+官方例程+驱动等)源码+文档说明+截图
- 基于yolov5-tensorRT检测+发动机缸体内壁缺陷检测系统源码+文档说明
- 基于C++实现的锂电池缺陷检测源码+文档说明
- push_version
- 软件自制图像批量压缩工具
- 经典缺陷检测算法源码整理包含PaDiM(2020ICPR)、PatchCore(2022CVPR)、SimpleNet+文档说明
- 基于深度学习的抗梯度噪声的缺陷检测器python源码+文档说明+模型的预训练
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功