My understanding of delegates

As I see it, right now we have the camera raycaster being tested every frame. The more we do that, the less efficient our game code will be. Eventually we could actually bog down the CPU with constant frame requests leading to lag.

The more efficient way of handing the layer test is using a method that will only be called when there is a change in the layer - ie: going from walkable to enemy. This is where using delegates will come in handy.

Privacy & Terms