Can't seem to get CanPlaceBuilding as true ever

Hello, so my BuildingButton and RTSPlayer Scripts should be similar to the ones of this course - checked in Github.

What seems to throw me of is the Commented line in the CmdTryPlaceBuilding-Method:

When having it commented out, I can place buildings everywhere, without getting Red/Green Color-Changes and without having restrictions. As soon as I un-comment that line, I am not able to drop down any of my Buildings anymore. The preview can be seen, but as soon as I have LeftMouseUp, the Preview disappears.

I have no Box Colliders on my Preview-Prefabs, the Resource & Spawner-Building Box Colliders are exactly on top of the Cubes.

I’m afraid I have messed something up in my Inspector settings on the way, but I truly can’t find what and when…

Found the solution.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms