Skip to main content
8 events
when toggle format what by license comment
Oct 11, 2019 at 17:05 vote accept Kiyo
Oct 9, 2019 at 20:24 comment added Kiyo DISREGARD THAT I WAS AN IDIOT AND FORGOT TO BIND THE SCRIPT TO THE UNIT! SORRY!
Oct 9, 2019 at 20:12 comment added Kiyo Could it be due to the fact that the unit controller only selects objects of tag "Unit"?
Oct 9, 2019 at 20:01 comment added Kiyo I see but even if I put the code in the unit it still doesn't seem to work...? I'm starting to lose patience with this method due to the fact I have deadlines to meet. I initially thought about putting a list in the main unit controller where it'd iterate through every unit in the scene and add it in if the positions were in the area of a ray cast. But I don't even know how to access every object in the scene...
Oct 6, 2019 at 20:44 history edited Justin Markwell CC BY-SA 4.0
added 79 characters in body
Oct 6, 2019 at 19:52 comment added Justin Markwell the CameraSelections script goes on the camera and creates the rect and the player script will take that info and automatically toggle if it is selected within the area here Selected = CameraSelections.selection.Contains(camPos); you can if you wanted to solely use the camera script to do the toggle but should be on the player and if there is multiple they will all toggle themselves selected if they are within the selection area
Oct 6, 2019 at 17:19 comment added Kiyo Thank you for the box making script. However, my unit controller operates from solely one script in the camera. I want to figure out how to check if a unit is in that box area.
Oct 6, 2019 at 4:39 history answered Justin Markwell CC BY-SA 4.0