mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-08 03:48:19 -05:00
Vrm10Instance が無い状態で Export を通す
This commit is contained in:
@@ -255,15 +255,21 @@ namespace UniVRM10
|
||||
int? thumbnailIndex) ExportVrm(GameObject root, Model model, ModelExporter converter,
|
||||
VRM10ObjectMeta vrmMeta, List<glTFNode> nodes, ITextureExporter textureExporter)
|
||||
{
|
||||
var vrmController = root?.GetComponentOrThrow<Vrm10Instance>();
|
||||
|
||||
if (vrmMeta == null)
|
||||
if (root == null)
|
||||
{
|
||||
if (vrmController?.Vrm?.Meta == null)
|
||||
throw new System.ArgumentNullException("root");
|
||||
}
|
||||
|
||||
if (root.TryGetComponent<Vrm10Instance>(out var vrmController))
|
||||
{
|
||||
if (vrmMeta == null)
|
||||
{
|
||||
throw new NullReferenceException("metaObject is null");
|
||||
if (vrmController.Vrm?.Meta == null)
|
||||
{
|
||||
throw new NullReferenceException("metaObject is null");
|
||||
}
|
||||
vrmMeta = vrmController.Vrm.Meta;
|
||||
}
|
||||
vrmMeta = vrmController.Vrm.Meta;
|
||||
}
|
||||
|
||||
var vrm = new UniGLTF.Extensions.VRMC_vrm.VRMC_vrm
|
||||
|
||||
Reference in New Issue
Block a user