From 114ee76bdf5e44db711d9502506243cfdb7da375 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 18 Jan 2021 15:20:27 +0900 Subject: [PATCH] Authors --- Assets/VRM10/Editor/Vrm10ExportDialog.cs | 1 + .../VRM10/Runtime/Components/Meta/VRM10MetaObject.cs | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Assets/VRM10/Editor/Vrm10ExportDialog.cs b/Assets/VRM10/Editor/Vrm10ExportDialog.cs index db9821ad1..2ed34bf75 100644 --- a/Assets/VRM10/Editor/Vrm10ExportDialog.cs +++ b/Assets/VRM10/Editor/Vrm10ExportDialog.cs @@ -68,6 +68,7 @@ namespace UniVRM10 Selection.selectionChanged += Repaint; m_tmpMeta = ScriptableObject.CreateInstance(); + m_tmpMeta.Authors = new string[] { "" }; m_state = new MeshUtility.ExporterDialogState(); m_state.ExportRootChanged += (root) => diff --git a/Assets/VRM10/Runtime/Components/Meta/VRM10MetaObject.cs b/Assets/VRM10/Runtime/Components/Meta/VRM10MetaObject.cs index 383487011..d395f1e07 100644 --- a/Assets/VRM10/Runtime/Components/Meta/VRM10MetaObject.cs +++ b/Assets/VRM10/Runtime/Components/Meta/VRM10MetaObject.cs @@ -79,14 +79,16 @@ namespace UniVRM10 { yield return Validation.Error("Require Name. "); } - // if (string.IsNullOrEmpty(Version)) - // { - // yield return Validation.Error("Require Version. "); - // } - if (Authors == null || Authors.Length == 0 || Authors.All(x => string.IsNullOrEmpty(x))) + + if (Authors == null || Authors.Length == 0) { yield return Validation.Error("Require at leaset one Author."); } + + if (Authors.All(x => string.IsNullOrWhiteSpace(x))) + { + yield return Validation.Error("All Authors is whitespace"); + } } public void CopyTo(VRM10MetaObject dst)