Answer the question
In order to leave comments, you need to log in
Error in unity c# script?
Gives error
Assetsigun.cs(29,13): error CS0246: The type or namespace name 'Target could not be found (are you missing a using directive or an assembly reference?)
void Shoot(){
RaycastHit hit;
if(Physics.Raycast(fpsCam.transform.position,fpsCam.transform.forward, out hit, range)){
Target enemy = hit.transform.GetComponent<enemy>();
if(enemy != null){
enemy.TakeDamage(damage); // ete enemy ka uremny kyanqery khani
}
}
}
Answer the question
In order to leave comments, you need to log in
I acknowledge the error and agree with its content. I don't know who Target is, nor is he.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question