For example, I instantiates units during my RTS game.
The unit has a field of vision script that detect what they sees.
How do I return a “true” to another script that isn’t connected to the unit.
I need the unit to see the building before I can gain access to that building’s resource.
The problem is the unit sees the building, but the script that handles that doesn’t send anything to the screentoraypoint script that handles taking the resource.
The problem I found is that the newly instantiated unit is a gameObject by itself and doesn’t have any connection with the screentoray gameObject. How can I get the information to communicate ?
I’m kinda stuck on this for a few hours now ![]()