Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1回目のVRM出力がエラーになる #191

Closed
vyv03354 opened this issue Feb 13, 2019 · 4 comments
Closed

1回目のVRM出力がエラーになる #191

vyv03354 opened this issue Feb 13, 2019 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@vyv03354
Copy link

vyv03354 commented Feb 13, 2019

使用ソフトウェアのバージョン:

  • Unity 2018.2.18f1
  • UniVRM-0.50

再現手順:

  1. 新規プロジェクトを作成する。
  2. UniVRM-0.50をインストールする。
  3. 添付のglbをAssetsにドロップしてインポートする。
  4. 生成されたprefabをHierarchyにドロップして配置する。
  5. 配置したオブジェクトを選択して、InspectorからAdd Component > Miscellaneous > Animator
  6. InspectorからAdd Component > Scripts > UniHumanoid > Bone Mapping
  7. Hipsに"hips"を割り当てる
  8. Guess bone mapping > Ensure T-Pose > Create avatarを順に実行
  9. メニューからVRM > UniVRM-0.50 > Export humanoid
  10. Authorを入力してExport

その結果:
以下のエラーが出てエクスポートできない
JsonSchemaValidationException: [allowedUserName.meta.VRM.extensions.glTF] null
UniJSON.JsonSchema.Serialize[glTF] (IFormatter f, UniGLTF.glTF o, UniJSON.JsonSchemaValidationContext c) (at Assets/VRM/UniJSON/Scripts/Json/JsonSchema.cs:404)
UniJSON.JsonSchemaExtensions.Serialize[glTF] (UniJSON.JsonSchema s, UniGLTF.glTF o, UniJSON.JsonSchemaValidationContext c) (at Assets/VRM/UniJSON/Scripts/Json/JsonSchema.cs:441)
UniGLTF.glTF.ToGlbBytes (Boolean UseUniJSONSerializer) (at Assets/VRM/UniGLTF/Scripts/Format/glTF.cs:510)
VRM.VRMExportSettings.Export (System.String path, System.Collections.Generic.List`1 destroy) (at Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs:273)
VRM.VRMExportSettings.Export (System.String path) (at Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs:233)
VRM.VRMExporterWizard.OnWizardCreate () (at Assets/VRM/UniVRM/Editor/Format/VRMExporterMenu.cs:42)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.ScriptableWizard.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/ScriptableWizard.cs:79)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:104)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:216)

期待される結果:
エラーにならず、VRMファイルを出力できること。

1回目の出力ではallowedUserNameはまだ設定されていないはずなのに、スキーマバリデーションが走ってしまっているように見えます。UniVRM-0.48では問題ありませんでした(スキーマバリデーションが未実装?)。

ruler.zip

@vyv03354
Copy link
Author

JsonSchemaValidationException: [allowedUserName.meta.VRM.extensions.glTF]

ところで細かいことですが、このエラーメッセージは正しくは
JsonSchemaValidationException: [glTF.extensions.VRM.meta.allowedUserName]
ではないでしょうか

@yutopp yutopp added this to the v0.51.0 milestone Feb 13, 2019
@yutopp yutopp self-assigned this Feb 13, 2019
@yutopp yutopp added the bug Something isn't working label Feb 13, 2019
@yutopp
Copy link
Contributor

yutopp commented Feb 13, 2019

報告ありがとうございます。今週中に調査・修正いたします。

@vyv03354
Copy link
Author

Use Experimental Exporterのチェックを外すとエクスポートできました。出力されたVRMを見ると、やはりallowedUserName(など)は未設定になっています。

@yutopp
Copy link
Contributor

yutopp commented Feb 14, 2019

このエラーメッセージは正しくは
JsonSchemaValidationException: [glTF.extensions.VRM.meta.allowedUserName]
ではないでしょうか

ありがとうございます。階層的にはそちらのほうが分かりやすそうですね... 近いうちに対応します。

Use Experimental Exporterのチェックを外すとエクスポートできました。

情報ありがとうございます。内部の新しいJsonExporter実装は制約に沿って適切にバリエーションをするので、今回この処理に引っかかっていた状態です。

#194 にて、制約を満たすようデフォルト値を設定し、問題を解消しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants