Skip to content

Commit

Permalink
Merge pull request #549 from ousttrue/fix/FixUnique
Browse files Browse the repository at this point in the history
set name if name is null
  • Loading branch information
ousttrue authored Sep 11, 2020
2 parents 1296895 + 13fd098 commit 8ea3051
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/VRM/UniGLTF/Scripts/IO/ImporterContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ void FixUnique()
var used = new HashSet<string>();
foreach (var mesh in GLTF.meshes)
{
if (string.IsNullOrEmpty(mesh.name))
{
mesh.name = Guid.NewGuid().ToString();
}
var lname = mesh.name.ToLower();
if (used.Contains(lname))
{
Expand Down

0 comments on commit 8ea3051

Please sign in to comment.