Merge pull request #549 from ousttrue/fix/FixUnique

set name if name is null
This commit is contained in:
ousttrue 2020-09-11 14:07:29 +09:00 committed by GitHub
commit 8ea30513d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,6 +330,10 @@ namespace UniGLTF
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))
{