diff --git a/Assets/VRM/Runtime/IO/MaterialIO/BuiltInRP/Export/BuiltInVrmMaterialExporter.cs b/Assets/VRM/Runtime/IO/MaterialIO/BuiltInRP/Export/BuiltInVrmMaterialExporter.cs index 82d26e25c..9b3f99216 100644 --- a/Assets/VRM/Runtime/IO/MaterialIO/BuiltInRP/Export/BuiltInVrmMaterialExporter.cs +++ b/Assets/VRM/Runtime/IO/MaterialIO/BuiltInRP/Export/BuiltInVrmMaterialExporter.cs @@ -10,33 +10,16 @@ namespace VRM public static readonly string[] SupportedShaderNames = { BuiltInVrmMToonMaterialExporter.TargetShaderName, - "VRM/UnlitTexture", - "VRM/UnlitTransparent", - "VRM/UnlitCutout", - "VRM/UnlitTransparentZWrite", }; private readonly BuiltInGltfMaterialExporter _gltfExporter = new BuiltInGltfMaterialExporter(); public glTFMaterial ExportMaterial(Material src, ITextureExporter textureExporter, GltfExportSettings settings) { - glTFMaterial dst = default; switch (src.shader.name) { case BuiltInVrmMToonMaterialExporter.TargetShaderName: - if (BuiltInVrmMToonMaterialExporter.TryExportMaterial(src, textureExporter, out dst)) return dst; - break; - case "VRM/UnlitTexture": - if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.OPAQUE, textureExporter, out dst)) return dst; - break; - case "VRM/UnlitTransparent": - if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.BLEND, textureExporter, out dst)) return dst; - break; - case "VRM/UnlitCutout": - if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.MASK, textureExporter, out dst)) return dst; - break; - case "VRM/UnlitTransparentZWrite": - if (BuiltInGenericUnlitMaterialExporter.TryExportMaterial(src, glTFBlendMode.BLEND, textureExporter, out dst)) return dst; + if (BuiltInVrmMToonMaterialExporter.TryExportMaterial(src, textureExporter, out var dst)) return dst; break; } diff --git a/Assets/VRM10/Runtime/FastSpringBone/InputPorts/FastSpringBoneBuffer.cs b/Assets/VRM10/Runtime/FastSpringBone/InputPorts/FastSpringBoneBuffer.cs index e86452f8c..c91391354 100644 --- a/Assets/VRM10/Runtime/FastSpringBone/InputPorts/FastSpringBoneBuffer.cs +++ b/Assets/VRM10/Runtime/FastSpringBone/InputPorts/FastSpringBoneBuffer.cs @@ -40,6 +40,7 @@ namespace UniVRM10.FastSpringBones.System Profiler.BeginSample("FastSpringBone.ConstructBuffers"); _externalData = new NativeArray(1, Allocator.Persistent); + ExternalData = externalData; // Transformの列挙 Profiler.BeginSample("FastSpringBone.ConstructBuffers.ConstructTransformBuffer"); diff --git a/README.md b/README.md index ce0536d68..a2607b881 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,96 @@ # UniVRM -UniVRM is `unity package` for Import and Export [VRM Format](https://vrm.dev/vrm_about/) +![GitHub latest release](https://img.shields.io/github/v/release/vrm-c/UniVRM?color=green) +![GitHub license](https://img.shields.io/github/license/vrm-c/UniVRM) -## Download +The standard implementation of 3D Avatar file format [VRM](https://vrm-consortium.org/en/) for [Unity](https://unity.com/). -* https://github.com/vrm-c/UniVRM/releases +VRM is an extension of [glTF 2.0](https://www.khronos.org/gltf/), so this library also support glTF 2.0 files. -## Manual +## Features -* https://vrm.dev/docs/univrm/ +UniVRM supports the [VRM 1.0 specification](https://github.com/vrm-c/vrm-specification) and the [glTF 2.0 specification](https://registry.khronos.org/glTF/). -## API Document +UniVRM can import/export following supported file types at both runtime and editor. -* https://vrm-c.github.io/UniVRM/ +### Supported file types +- VRM 1.0 (.vrm) +- VRM 0.x (.vrm) +- glTF 2.0 (.glb | .gltf | .zip) + +### Import features +- You can import supported file types at both runtime and editor. +- Support for async/await importing at runtime. +- Support for Migration VRM 0.x files into VRM 1.0 files. +- Support for ScriptedImporter for VRM 1.0 and glTF 2.0. +- You can import glTF's PBR materials into Unity Built-in RP's Standard materials. + +### Export features +- You can export supported file types at both runtime and editor. +- You can export Unity Built-in RP's Standard materials into glTF's PBR materials. + +## Supported Environments + +The latest UniVRM supports Unity 2020.3 LTS or later. + +UniVRM supports scripting backends both .NET and IL2CPP. + +UniVRM supports the following building target platforms: + +- Standalone (Windows/Mac/Linux) +- iOS +- Android +- WebGL + +The other platforms maybe work but they are not tested. + +## Installation + +![GitHub latest release](https://img.shields.io/github/v/release/vrm-c/UniVRM?color=green) + +You can install UniVRM using the UnityPackage or the UPM Package. + +### UnityPackage + +From the [latest release](https://github.com/vrm-c/UniVRM/releases/latest), you can download the `.unitypackage` files. + +- For import/export VRM 1.0 + - You can download **VRM-0.XXX.X-YYYY.unitypackage**. + - You can also download sample projects as **VRM_Samples-0.XXX.X-YYYY.unitypackage**. +- For import/export VRM 0.x + - You can download **UniVRM-0.XXX.X-YYYY.unitypackage**. + - You can also download sample projects as **UniVRM_Samples-0.XXX.X-YYYY.unitypackage**. +- For import/export glTF 2.0 + - You can download **VRM-0.XXX.X-YYYY.unitypackage**. + +### UPM Package + +From the [latest release](https://github.com/vrm-c/UniVRM/releases/latest), you can find UPM package urls. + +- For import/export VRM 1.0 + - You have to install all of the following UPM packages: + - `com.vrmc.vrmshaders` + - `com.vrmc.gltf` + - `com.vrmc.vrm` +- For import/export VRM 0.x + - You have to install all of the following UPM packages: + - `com.vrmc.vrmshaders` + - `com.vrmc.gltf` + - `com.vrmc.univrm` +- For import/export glTF 2.0 + - You have to install all of the following UPM packages: + - `com.vrmc.vrmshaders` + - `com.vrmc.gltf` + +You can install these UPM packages via `Package Manager` -> `+` -> `Add package from git URL...` in UnityEditor. + +## Documentation + +- https://vrm.dev/en/vrm/index.html + +### For developers + +- https://vrm-c.github.io/UniVRM/en/ ## License