- Home /
How to implement Jobs?,How can I increase performance with Jobs?
I have a performance issue with the prototype of my game. In my game I have a ground which is built on 10000 SpriteRenderers in a 100x100 grid (Which is not causing issues because I am not rendering 1 percent of the whole thing). I have all of the spriterenderers in a public 2D gameobject array (I am storing the objects and not the components of it). And then I want to click on a cell for it to be deleted which is for testing purposes only since I will change that. So I needed to make a double for loop to loop around the whole grid. When I do that, I get about 30ms which is not ideal, my target is less than 10ms. I figured that multi-threading may work, but the Jobs system does not allow me to use a class inside of it (gameobject 2d array). Can someone help me find how can I do that. Thanks in advance.