vrm-c / UniVRM

UniVRM is a gltf-based VRM format implementation for Unity. English is here https://vrm.dev/en/ . 日本語 はこちら https://vrm.dev/

Home Page:https://vrm.dev/en

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when migrating from 0.x to 1.0: InvalidOperationException: Failed to add object of type `VRM10Object`

3ternal opened this issue · comments

Environments (please complete the following information):

  • UniVRM version: 0.115.0
  • Unity version: Unity-2022.3.6
  • OS: Windows 10

Describe the bug

I'm getting the following two errors when I try to migrate a VRM 0.x file to 1.0.

InvalidOperationException: Failed to add object of type `VRM10Object`. Check that the definition is in a file of the same name and that it compiles properly.
UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj) (at <347e3e2bef8c4deb82c9790c6e198135>:0)
UniVRM10.VrmScriptedImporterImpl+<>c__DisplayClass1_0.<Process>b__3 (VRMShaders.SubAssetKey key, UnityEngine.Object o) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs:58)
UniGLTF.RuntimeGltfInstance.TransferOwnership (VRMShaders.TakeResponsibilityForDestroyObjectFunc take) (at Assets/_Asset Store/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs:237)
UniVRM10.VrmScriptedImporterImpl.Process (UniVRM10.Vrm10Data result, UnityEditor.AssetImporters.ScriptedImporter scriptedImporter, UnityEditor.AssetImporters.AssetImportContext context, UniGLTF.RenderPipelineTypes renderPipeline) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs:56)
UniVRM10.VrmScriptedImporterImpl.Import (UnityEditor.AssetImporters.ScriptedImporter scriptedImporter, UnityEditor.AssetImporters.AssetImportContext context, System.Boolean doMigrate, UniGLTF.RenderPipelineTypes renderPipeline) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs:104)
UniVRM10.VrmScriptedImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporter.cs:22)
UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <347e3e2bef8c4deb82c9790c6e198135>:0)
UnityEditor.AssetDatabase:ImportAsset(String, ImportAssetOptions)
UniGLTF.RemapScriptedImporterEditorBase:Apply() (at Assets/_Asset Store/UniGLTF/Editor/UniGLTF/ScriptedImporter/RemapScriptedImporterEditorBase.cs:99)
UnityEditor.AssetImporters.AssetImporterEditor:ApplyRevertGUI()
UniVRM10.VrmScriptedImporterEditorGUI:OnInspectorGUI() (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterEditorGUI.cs:156)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Asset import failed, "Assets/Models/Private/aqua_v1.1.vrm" > InvalidOperationException: Failed to add object of type `VRM10Object`. Check that the definition is in a file of the same name and that it compiles properly.
UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj) (at <347e3e2bef8c4deb82c9790c6e198135>:0)
UniVRM10.VrmScriptedImporterImpl+<>c__DisplayClass1_0.<Process>b__3 (VRMShaders.SubAssetKey key, UnityEngine.Object o) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs:58)
UniGLTF.RuntimeGltfInstance.TransferOwnership (VRMShaders.TakeResponsibilityForDestroyObjectFunc take) (at Assets/_Asset Store/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs:237)
UniVRM10.VrmScriptedImporterImpl.Process (UniVRM10.Vrm10Data result, UnityEditor.AssetImporters.ScriptedImporter scriptedImporter, UnityEditor.AssetImporters.AssetImportContext context, UniGLTF.RenderPipelineTypes renderPipeline) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs:56)
UniVRM10.VrmScriptedImporterImpl.Import (UnityEditor.AssetImporters.ScriptedImporter scriptedImporter, UnityEditor.AssetImporters.AssetImportContext context, System.Boolean doMigrate, UniGLTF.RenderPipelineTypes renderPipeline) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs:104)
UniVRM10.VrmScriptedImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporter.cs:22)
UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <347e3e2bef8c4deb82c9790c6e198135>:0)
UnityEditor.AssetDatabase:ImportAsset(String, ImportAssetOptions)
UniGLTF.RemapScriptedImporterEditorBase:Apply() (at Assets/_Asset Store/UniGLTF/Editor/UniGLTF/ScriptedImporter/RemapScriptedImporterEditorBase.cs:99)
UnityEditor.AssetImporters.AssetImporterEditor:ApplyRevertGUI()
UniVRM10.VrmScriptedImporterEditorGUI:OnInspectorGUI() (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterEditorGUI.cs:156)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

UnityEngine.StackTraceUtility:ExtractStackTrace ()
UniGLTF.RemapScriptedImporterEditorBase:Apply () (at Assets/_Asset Store/UniGLTF/Editor/UniGLTF/ScriptedImporter/RemapScriptedImporterEditorBase.cs:99)
UnityEditor.AssetImporters.AssetImporterEditor:ApplyRevertGUI ()
UniVRM10.VrmScriptedImporterEditorGUI:OnInspectorGUI () (at Assets/_Asset Store/VRM10/Editor/ScriptedImporter/VrmScriptedImporterEditorGUI.cs:156)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Now, I was actually able to get this working before, and I'm not sure what changed in my configuration to break it. I'm currently using the .unitypackage versions rather than the UPM versions, and I've installed URP, but I'm testing in the Built-In Render Pipeline and still getting this error.

Any idea why this is happening?

This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded.

This issue has been closed due to no response within 14 days after labeled as "stale", 7 days after last reopened, and 7 days after last commented.