getting rid of linq, just using arrays instead
This commit is contained in:
Родитель
ac84a07fcc
Коммит
88f9f16165
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче