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

fbx/vrmからExportするとVRMファイルは生成されるがエラーが出る #348

Closed
shiena opened this issue Dec 18, 2019 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@shiena
Copy link

shiena commented Dec 18, 2019

バグについて

fbx/vrmからExportするとVRMファイルは生成されるがエラーが出る。

再現方法

  1. Kyleをインポートする
  2. Kyleのアニメーションタイプをヒューマノイドに変更する
  3. プロジェクトタブからRobot Kyle.fbxを選択する
  4. メニューのVRM > UniVRM-0.54.0 > Export humanoidを選択する
  5. Authorに適当に入力する
  6. Exportボタンを押す

vrmファイルでも同様の手順でエラーが出ます。

エラーログ

ArgumentException: Calling apply or revert methods on an object which is not part of a Prefab instance is not supported.
Parameter name: prefabInstanceObject
UnityEditor.PrefabUtility.ThrowExceptionIfNotValidPrefabInstanceObject (UnityEngine.Object prefabInstanceObject, System.Boolean isApply) (at C:/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:292)
UnityEditor.PrefabUtility.RevertPrefabInstance (UnityEngine.GameObject instanceRoot, UnityEditor.InteractionMode action) (at C:/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:307)
VRM.VRMExportSettings.Export (System.String path, System.Collections.Generic.List`1[T] destroy) (at Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs:396)
VRM.VRMExportSettings.Export (System.String path) (at Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs:258)
VRM.VRMExporterWizard.OnWizardCreate () (at Assets/VRM/UniVRM/Editor/Format/VRMExporterMenu.cs:42)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <567df3e0919241ba98db88bec4c6696f>:0)
UnityEditor.ScriptableWizard.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/ScriptableWizard.cs:79)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <567df3e0919241ba98db88bec4c6696f>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:359)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:353)
UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:138)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:190)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

期待する動作

エラーが出ないこと

スクリーンショット

image

環境情報

  • OS: Windows 10
  • UniVRM version: 0.54.0
  • Unity2019.3.0f3 / Unity2019.2.16f1

追加の状況・背景

ヒエラルキーに配置した3Dモデルを選択してエクスポートした場合はエラーは起きません。
また、Unity2017.4.28f1ではfbxを選択してエクスポートしてもエラーは起きません。

@shiena shiena changed the title fbxからExportするとVRMファイルは生成されるがエラーが出る fbx/vrmからExportするとVRMファイルは生成されるがエラーが出る Dec 18, 2019
@hiroj hiroj added this to the v0.55 milestone Dec 19, 2019
@hiroj hiroj added the bug Something isn't working label Dec 19, 2019
@hiroj
Copy link
Contributor

hiroj commented Dec 19, 2019

こちらのissueは #349 と同じ問題でしょうか?

@hiroj
Copy link
Contributor

hiroj commented Dec 19, 2019

再現しました、[Project]にあるFbxのPrefabを直接選択した状態でExport humanoidを行うとPrefabの状態をもとに戻す処理でエラーが出ているようです。
お手数ですがエラーが出る場合は、FbxのPrefabをいったん[Hierarchy]に配置したものを選択した状態で[Export humanoid]してください。
次回のバージョンで修正を検討致します。

@hiroj
Copy link
Contributor

hiroj commented Dec 26, 2019

https://github.com/vrm-c/UniVRM/releases/tag/v0.55.0
Robot Kyle.fbxで検証してエラーが出ないように修正が入りました。

@shiena
Copy link
Author

shiena commented Dec 26, 2019

fbxからExport humanoidを行ってエラーが出なくなりました。ご対応ありがとうございました。

@shiena shiena closed this as completed Dec 26, 2019
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