Hello guys.
I’m creating some kind of a farming game and it’s 2D.
There are machines you can build and they need an energy source to run.
For that, I was thinking about creating typical generators which you can place wherever you want.
They should have a certain area and everything inside that area is able to run.
I’m asking myself what the best solution would be for this regarding performance also.
My first thought was to give the generator a box collider as a trigger to represent the area. But as far as I know, then I would have to use OnTriggerStay2D to know, which objects are inside. Im totally lost if we talk about performance, so I would like to have some kind of discussion here.
Thx for your time.