Merge pull request #325 from ropo/ropo/fixMemoryLeakInEditorlookat

Fix: memory leak in editor preview
This commit is contained in:
hiroj 2020-06-15 14:45:28 +09:00 committed by GitHub
commit 77e1e673f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,3 @@
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UniGLTF;
@ -115,8 +114,9 @@ namespace VRM
target.position + new Vector3(0, 0.1f, 0),
target.forward
);
foreach(var x in m_items)
for(int j=0; j<m_items.Length; ++j)
{
ref var x = ref m_items[j];
var mesh = x.Baked();
for(int i=0; i<x.Materials.Length; ++i)
{