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

メッシュ名が「.」で始まるとインポートに失敗する #611

Closed
esperecyan opened this issue Nov 14, 2020 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@esperecyan
Copy link

バグについて

「.」で始まるメッシュ名を含むVRMファイルをインポートするとインポートに失敗します。

夢野ちかげさんからの報告です。
https://twitter.com/chikagemaru_any

再現方法

動作の再現させる手順:

  1. VRoidモバイル でアバターを作成する
  2. 作成したアバターをVRoid Hubへアップロードする
  3. VRoid Hubへアップロードしたアバターをダウンロードする
  4. Unityへインポートする
  5. 以下のエラーが発生し、インポートに失敗する
「Assets/test/717053123939623455.Meshes/.baked.asset」は有効なアセットファイル名ではありません
UnityEditor.AssetDatabase:CreateAsset(Object, String)
UniGLTF.UnityPath:CreateAsset(Object) (at Assets/VRM/UniGLTF/Scripts/IO/UnityPath.cs:401)
UniGLTF.ImporterContext:SaveAsAsset(UnityPath) (at Assets/VRM/UniGLTF/Scripts/IO/ImporterContext.cs:963)
VRM.<>c__DisplayClass1_0:<ImportVrm>b__0() (at Assets/VRM/UniVRM/Editor/Format/vrmAssetPostprocessor.cs:52)
UnityEditor.EditorApplication:Internal_CallDelayFunctions()
UnityException: Creating asset at path Assets/test/717053123939623455.Meshes/.baked.asset failed.
UniGLTF.UnityPath.CreateAsset (UnityEngine.Object o) (at Assets/VRM/UniGLTF/Scripts/IO/UnityPath.cs:401)
UniGLTF.ImporterContext.SaveAsAsset (UniGLTF.UnityPath prefabPath) (at Assets/VRM/UniGLTF/Scripts/IO/ImporterContext.cs:963)
VRM.vrmAssetPostprocessor+<>c__DisplayClass1_0.<ImportVrm>b__0 () (at Assets/VRM/UniVRM/Editor/Format/vrmAssetPostprocessor.cs:52)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:209)

期待する動作

Unityで取り扱えるファイル名にリネームされてインポートされる。

環境情報

  • OS: Windows 10
  • Unity version: Unity-2018.4.20
  • UniVRM version: 0.61.1
@ousttrue
Copy link
Contributor

CreateAsset 関数で UnityException を catch した場合に、ランダムな名前を作成して retry するように修正しました。

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

3 participants