Targeting System Recommendation

I feel bad about asking another question, but I have been stuck on this. My game is a fantasy horde mode game, where the players have both melee and ranged attacks. I don’t know what to do to set up the targeting system. It can’t be “Find the closest enemy”, because the player also has ranged attacks. It can’t be tab-targeting, because the game is skill based.

I’m not asking for a script, but an idea of what to use as a targeting system. It has to support damage from up-close melee attacks and ranged attacks to the target automatically. Any ideas?

Thanks in advance!

Think about the attack types you’ll have in your game and match those up with the target system(s) you’ll want to offer. Physical melee might be ‘find closest’ or you might offer that with a tab target/lock to focus a particular enemy; physical ranged can be raycast or tab target, but you might also need a general AoE no enemy target needed which could be a different code twist than one requiring a target. And IMHO,left-clicking on a bad guy should always target it (and initiate an attack if one is mapped to left-mouse click)

So you’ll likely have several target methods in your code, but selection of one will be based on inputs such as current attack, is a bad guy being raycasted and more.

This is all pretty subjective and probably better suited for the Unity Forums, not sure any one answer can be selected.