{"id":24424023,"url":"https://github.com/yutopp/vgltf","last_synced_at":"2025-04-12T07:51:20.978Z","repository":{"id":34279716,"uuid":"170310400","full_name":"yutopp/VGltf","owner":"yutopp","description":"A pure C# glTF 2.0 importer/exporter library with support for Unity integration.","archived":false,"fork":false,"pushed_at":"2023-05-22T15:57:36.000Z","size":64339,"stargazers_count":64,"open_issues_count":17,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T07:19:01.151Z","etag":null,"topics":["csharp","glb","gltf","importer","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yutopp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_1_0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-12T11:58:50.000Z","updated_at":"2024-10-02T13:50:58.000Z","dependencies_parsed_at":"2023-01-15T06:00:39.507Z","dependency_job_id":null,"html_url":"https://github.com/yutopp/VGltf","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutopp%2FVGltf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutopp%2FVGltf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutopp%2FVGltf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutopp%2FVGltf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yutopp","download_url":"https://codeload.github.com/yutopp/VGltf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537003,"owners_count":21120688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","glb","gltf","importer","unity","unity3d"],"created_at":"2025-01-20T10:48:52.038Z","updated_at":"2025-04-12T07:51:20.936Z","avatar_url":"https://github.com/yutopp.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VGltf 🗿\n\n[![ci](https://github.com/yutopp/VGltf/actions/workflows/ci.yml/badge.svg)](https://github.com/yutopp/VGltf/actions/workflows/ci.yml)\n[![NuGet Badge](https://buildstats.info/nuget/vgltf)](https://www.nuget.org/packages/VGltf/)\n[![codecov](https://codecov.io/gh/yutopp/VGltf/branch/master/graph/badge.svg)](https://codecov.io/gh/yutopp/VGltf)\n[![license](https://img.shields.io/github/license/yutopp/VGltf.svg)](https://github.com/yutopp/VGltf/blob/master/LICENSE_1_0.txt)\n[![gltf-2.0](https://camo.githubusercontent.com/4a2bc1263a5da1ed3190e23186521ffd9a2d51b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f676c54462d32253245302d677265656e2e7376673f7374796c653d666c6174)](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0)\n![unity](https://img.shields.io/badge/unity-2019.4%2B-blue.svg)\n\nVGltf is a library that simplifies the import and export of glTF 2.0 assets in your C# standard and Unity projects.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"docs/layer.png\" alt=\"VGltf package structure\"/\u003e\u003c/p\u003e\n\n## Key Features\n\n- **Broad compatibility**: Designed for **both** `C# standard projects` and `Unity`, ensuring seamless integration.\n- **Extensibility**: Easily extendable to accommodate custom glTF extensions with `hooks`.\n  - For example, [VRM 0.x](https://github.com/vrm-c/vrm-specification) is [supported](/Packages/net.yutopp.vgltf.ext.vrm0) without modifying the core library.\n- **Readability**: Clean and comprehensible codebase for quick learning and adaptation.\n- **Stability**: Focused on reliability and performance across various projects.\n- **Flexible support**: Compatible with `.NET Standard 2.0` or `higher` and tested on many platforms.\n\n### Unity Compatibility\n\nVGltf is compatible with `Unity 2019.4` or `higher` and supports the following:\n\n- ⭕ Run-time import\n- ⭕ Run-time export\n- 🔺 Design-time (Unity Editor) import\n  - Integration with AssetDatabase is not supported\n- ⭕ Design-time (Unity Editor) export\n\nTested platforms include:\n\n- Windows [Mono, IL2CPP]\n- Linux [Mono, IL2CPP]\n- MacOS [Intel and ARM] x [Mono, IL2CPP]\n- iOS\n- Android\n- WebGL ([Sample project](https://github.com/yutopp/webgl-vgltf-sample) for `WebGL` with `Unity 2022.1`)\n\n## Getting Started\n\n### Import glTF file\n\nThe following code demonstrates how to import a glTF file and convert it into a Unity GameObject.\nThe input glTF data structure assumes multiple root nodes, which are combined into a single GameObject.\n\n```csharp\nusing UnityEngine;\nusing System.IO;\nusing VGltf.Unity;\nusing VGltf;\n\nvar gltfContainer = default(GltfContainer);\nusing (var fs = new FileStream(\"Lantern.glb\", FileMode.Open))\n{\n    gltfContainer = GltfContainer.FromGlb(fs);\n}\n\nvar go = new GameObject();\n\nvar timeSlicer = new DefaultTimeSlicer();\nvar context = default(IImporterContext);\nusing (var gltfImporter = new Importer(gltfContainer, timeSlicer))\n{\n    context = await gltfImporter.ImportSceneNodes(go, System.Threading.CancellationToken.None);\n}\n```\n\nPassing [Lantern.glb](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Lantern), you can get the following result.\n\n![Lantern](/docs/lantern.png)\n\nFor a more practical example, see [Assets/Assets/VGltfExamples/glTFExample/Scripts/GltfLoader.cs](./Assets/VGltfExamples/glTFExample/Scripts/GltfLoader.cs).\n\nAs another topic, skinned meshes with Unity Mecanim is supported by default when using either the VRM 0.x extension or VGltf's [VGLTF_unity_avatar extension](/Packages/net.yutopp.vgltf.unity/Runtime/Extra/AvatarTypes.cs).\n\n![VroidAvatarSample_A](/docs/vroid-avatar-sample_a.gif)\n\nFor more details, see [Assets/VGltfExamples/VRMExample/Scripts/VRMLoader.cs](./Assets/VGltfExamples/VRMExample/Scripts/VRMLoader.cs).\n\n## Installation\n\n### For standard C# projects\n\n#### Using NuGet\n\nInstall [Nuget/VGltf](https://www.nuget.org/packages/VGltf/).\n\n```bash\ndotnet add package VGltf\n```\n\n### For Unity projects\n\nVGltf depends on [VJson](https://github.com/yutopp/VJson), so please add it to the dependencies.\n\n#### Using Git\n\nAdd the following VGltf Git repository URLs to your `Packages/manifest.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"net.yutopp.vgltf\": \"https://github.com/yutopp/VGltf.git?path=Packages/net.yutopp.vgltf\",\n    \"net.yutopp.vgltf.unity\": \"https://github.com/yutopp/VGltf.git?path=Packages/net.yutopp.vgltf.unity\",\n\n    \"net.yutopp.vjson\": \"https://github.com/yutopp/VJson.git?path=Packages/net.yutopp.vjson#v0.9.12\",\n\n    // Optional\n    \"net.yutopp.vgltf.ext.vrm0\": \"https://github.com/yutopp/VGltf.git?path=Packages/net.yutopp.vgltf.ext.vrm0\",\n    \"net.yutopp.vgltf.ext.vrm0.unity\": \"https://github.com/yutopp/VGltf.git?path=Packages/net.yutopp.vgltf.ext.vrm0.unity\"\n  }\n}\n```\n\n**We recommend using the [stable version](https://github.com/yutopp/VGltf/tags) by [specifying the tag](https://docs.unity3d.com/2019.4/Documentation/Manual/upm-git.html#revision).**\n\n#### Using npm repository\n\nAdd scoped registry information to your `Packages/manifest.json` if not exists:\n\n```json\n{\n  \"scopedRegistries\": [\n    {\n      \"name\": \"yutopp.net\",\n      \"url\": \"https://registry.npmjs.com\",\n      \"scopes\": [\n        \"net.yutopp\"\n      ]\n    }\n  ]\n}\n```\n\nThen, add `net.yutopp.vgltf.*` to your `Packages/manifest.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"net.yutopp.vgltf\": \"v0.2.25\",\n    \"net.yutopp.vgltf.unity\": \"v0.2.25\",\n\n    \"net.yutopp.vjson\": \"v0.9.12\",\n\n    // Optional\n    \"net.yutopp.vgltf.ext.vrm0\": \"v0.2.25\",\n    \"net.yutopp.vgltf.ext.vrm0.unity\": \"v0.2.25\"\n  }\n}\n```\n\n## TODO\n\n- [ ] Performance tuning\n\n## License\n\n[Boost Software License - Version 1.0](./LICENSE_1_0.txt)\n\n## References\n\n- [glTF 2.0 Specification](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0)\n\n## Author\n\n- [@yutopp](https://github.com/yutopp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutopp%2Fvgltf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyutopp%2Fvgltf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutopp%2Fvgltf/lists"}