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

UniVRM0.59 でモデルによっては、UniGLTF.ImporterContext.FixUnique() でヌルポが出る #545

Closed
fantom1x opened this issue Sep 10, 2020 · 1 comment
Labels
bug Something isn't working importer
Milestone

Comments

@fantom1x
Copy link
Contributor

バグについて

https://github.com/vrm-c/UniVRM/blob/master/Assets/VRM/UniGLTF/Scripts/IO/ImporterContext.cs#L333

行において、mesh.name が null になっている場合、NullReferenceException が出ます。

再現方法

特に一般的な GLTF モデルでは顕著です(他アプリでエクスポートされた場合、全てのメッシュが名無しもある?)。

(例)
https://sketchfab.com/3d-models/hampton-lake-dam-post-hurricane-irma-a28144252dc74062a40672b5de3b7120
https://sketchfab.com/3d-models/floating-island-of-the-potion-brewer-555992efd5c74cf299f5a3ab4acd0a3b

期待する動作

私が試したところ、例えば、

if (string.IsNullOrEmpty(mesh.name))
{
    mesh.name = Guid.NewGuid().ToString();
}

のように、適当な文字列を入れてみたら、普通にロードできました。

命名規則などもあるかもなので、ご報告だけしておきます。

環境情報

  • OS: Windows 10 (x64)
  • UniVRM version: 0.59
  • Unity 2019.2.21f1
ousttrue added a commit to ousttrue/UniVRM that referenced this issue Sep 11, 2020
@ousttrue
Copy link
Contributor

この修正で hampton_lake_dam_post_hurricane_irma ロードできました。

@hiroj hiroj added this to the v0.60 milestone Sep 14, 2020
@hiroj hiroj added the bug Something isn't working label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working importer
Projects
None yet
Development

No branches or pull requests

3 participants