Unity HUD Tracking and Target Selection
Hi there,
So I've been trying to figure out how to put together a unity HUD (HUD being the camera view) for a space shooter, where the HUD would track objects/targets and give a target outline on the HUD in the field of view and would also track a chosen target.
Now I think I've royally confused myself as to how to go about doing this, and I'm looking for some guidance - I don't want a solution but just some suggestions and/or functions I would need to use in scripting as I'm trying to learn things myself.
Putting together the actual GUI HUD isn't a big concern for me, I've read enough to be confident that I'd be able to come up with a solution - however the issue I'm stuck on is initial process to collect all of the available targets and then toggle through them until a desired target is selected.
My current approach has been to acquire all of the game objects through a huge collider and sort the objects based on tags, then put them into a stack/list which the player would then be able to toggle through until the selected one is the desired target.
Now the biggest roadblock about this is 1) I don't exactly know how to initiate/populate a list in C# - so if there's any documentation out there, I'd love to have a peak at it. and 2), I feel as though such a method would be very tasking for a system, having to do collision checks every update, however I may be overestimating the performance costs of such a task.
Any help would be appreciated.
Thanks,