getting rid of linq, just using arrays instead

This commit is contained in:
Mike Wuetherick 2019-05-08 08:27:47 -07:00
Родитель ac84a07fcc
Коммит 88f9f16165
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Unity.FilmTV.Toolbox
@ -8,8 +7,8 @@ namespace Unity.FilmTV.Toolbox
{
public GameObject fbxLookDev; // our master fbx that we look to for our source materials
private List<Renderer> sourceMeshList = new List<Renderer>();
private List<Renderer> destMeshList = new List<Renderer>();
private Renderer[] sourceMeshList;
private Renderer[] destMeshList;
[ContextMenu("Sync Materials")]
public void SyncMaterials()
@ -20,8 +19,8 @@ namespace Unity.FilmTV.Toolbox
return;
}
sourceMeshList = fbxLookDev.GetComponentsInChildren<Renderer>().ToList();
destMeshList = gameObject.GetComponentsInChildren<Renderer>().ToList();
sourceMeshList = fbxLookDev.GetComponentsInChildren<Renderer>();
destMeshList = gameObject.GetComponentsInChildren<Renderer>();
// sync them
foreach( var destMesh in destMeshList)
@ -36,5 +35,6 @@ namespace Unity.FilmTV.Toolbox
}
}
}
}
}