こうじゃ。
UniVRM と Ready Player Me Unity SDK Core をインポートしたら、コンソールに以下の表示があった。
Multiple scripted importers are targeting the extension 'gltf' and have all been rejected: GLTFast.Editor.GltfImporter (assembly: C:\■PROJECT DIRECTORY■\Library\ScriptAssemblies\glTFast.Editor.dll), UniGLTF.GltfScriptedImporter (assembly: C:\■PROJECT DIRECTORY■\Library\ScriptAssemblies\UniGLTF.Editor.dll)
UnityEditor.AssetImporters.ScriptedImporter:RegisterScriptedImporters ()
Multiple scripted importers are targeting the extension 'glb' and have all been rejected: GLTFast.Editor.GltfImporter (assembly: C:\■PROJECT DIRECTORY■\Library\ScriptAssemblies\glTFast.Editor.dll), UniGLTF.GlbScriptedImporter (assembly: C:\■PROJECT DIRECTORY■\Library\ScriptAssemblies\UniGLTF.Editor.dll)
UnityEditor.AssetImporters.ScriptedImporter:RegisterScriptedImporters ()
フォーラムで以下の回答が見つかった。
If you can edit one of these plugins' code in your project then you should be able to work around the issue easily.
Choose one of the importer that you don't want to be the default for gltf import, and change the [ScriptedImporter] attribute to make it an optional importer.
// Default importer
[ScriptedImporter(1, new [] {"gltf", "glb"})]
// Optional importer
[ScriptedImporter(1, null, new [] {"gltf", "glb"})]
From that point, selecting any gltf or glb asset in your project should show you a drop-down at the top of the inspector to let you change which importer you want to use on that asset.
競合しているので、どちらかがデフォルトではなくなるようにスクリプトを書きかえれば良いらしい。
とりあえず UniVRM に入ってる方をデフォルトにすることにした。
glb, gltf それぞれでプロジェクト内を検索し、それっぽいスクリプトを開く。
すでにプラットフォーム依存コンパイル(#if ディレクティブ)として、UNIGLTF_DISABLE_DEFAULT_GLTF_IMPORTER
と UNIGLTF_DISABLE_DEFAULT_GLB_IMPORTER
が使えることが分かった。
Project Settings > Player > Other Settings > Script Compilation > Scripting Define Symbols に、上記の項目を追加する。
Apply を押下するとコンパイルが走り、問題が解決する。
追記 @ 2023-03-01
この作業はプラットフォームごとに設定が必要です。