Hello.Some one explain me why im thinking wrong with this code?
in this line CombatTarget target = hit.transform.GetComponent();
why i have to access the transform and then GetComponent<>() ?
Why is not working the code this way:
CombatTarget target = hit.GetComponent(); ?
Why i cant skip the hit.transform? In my head we acces the hit variable. Then we want to get acces to combat target component. I dont understand the transform acces here.
Thank you.