Help Optimizng Large Scale Part Count Scan!

So I’ll keep this short and simple.

I’m coding something that lets you grow any model if it meets the requirements all the animation stuff and growing is complete and I like how it turned out now the painful part begins optimization I have already optimized the code quite a bit so far and now I have a big problem where I don’t know how to handle replanting with large amount of plant spots at the moment I have a script that looks through ever part with the tag [PlantName]GrowSpot and the issue is when you harvest a plant it loops through all of those parts again every time (my game freezes every time and i have a decent pc) don’t wanna imagine what will happen to mobile so what would be the best way to save all the plant spots a table maybe? I’m not sure if you have any other posts that explain this well I would very much appreciate it. :slight_smile:

(this was not short and simple :sob:)

2 Likes

you can try spreading the task across multiple threads

1 Like