How to get the position of different objects using the same script?
My game is a 2D game and I have bots that move around randomly, they use the same script. I have it so if I click on one it gets selected but I want to make it so if they are too far away they get deselected. How do i get the position of one object without typing in the name of all of them. (The Script is on the object)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613012624im_/https://answers.unity.com/themes/thub/images/avi.jpg)