fabriziospadaro / SpriteSheetRenderer

Spritesheet renderer is a powerful Unity ECS API to render massive numbers of sprites using the new dots stack, taking full advantage of Jobs, DynamicBuffers and ComputeBuffer

Home Page:https://www.linkedin.com/in/fabrizio-spadaro/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to remove null materials?

Nomy1 opened this issue · comments

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]);

I'm very sorry, I was mistaken