Unable to remove null materials?
Nomy1 opened this issue · comments
Jonathan Bro commented
You intend to remove missing materials in SpriteSheetRenderer.cs but you may miss nulls if you don't iterate through the loop backwards, correct? (The list's remove method will decrease the Count)
for(int i = 0; i < materials.Count; i++) if(!materials[i].material) materials.Remove(materials[i]);
Jonathan Bro commented
I'm very sorry, I was mistaken