Hi,
I’m trying to build the camera in such a way that you are not able to see enemy units and buildings unless one of your units or buildings is nearby, like in many RTS.
I was trying to achieve this by changing the cullingMask through code for when the camera did not have any nearby units or buildings with authority, but as you may have guessed, both enemies and player units/buildings share the same layer, so when I change the cullingMask, I cannot see my units as well, which is not a huge problem since as soon as the camera is in range with friendly units/buildings, it changes the cullingMask again so that they get rendered.
So, what I’m looking for is to know if there is a better way to do this without having my own units and buildings affected.
Many thanks for the help.