Hi everyone =)
I am curretly trying to make some additions to the ShootAction script so when you select the action it draws a small line from your selected unit towards all targets that are in range.
i currently have made a simple function that runs through the enemy unit list, and draws a debug line towards the enemies it looks fine in the scene view and all but i would like it to show up doing runtime in the game view so the player can see all the targets that are currently in range.
private void DrawTargetLines() {
foreach (Unit targetUnit in enemyUnitList) {
Vector3 playerPosition = unit.GetWorldPosition();
Vector3 targetPosition = targetUnit.GetWorldPosition();
Debug.DrawLine(playerPosition + Vector3.up, targetPosition + Vector3.up, Color.white);
}
}
i have tried using the line renderer however it simply connected the enemies with one line.
does anyone have a good idea of what i could try to use or how to fix this?