When I try to reference a variable from another script on my project, it gives me the error "Operator '>' cannot be applied to operands of type 'MoveBlueCannon2' and 'int'".
Here is my code:
void Update ()
{
MoveBlueCannon2 BasicAmmoBlue = GetComponent<MoveBlueCannon2>();
if (BasicAmmoBlue > 0)
{
print ("1");
}
Ideas?
Aucun commentaire:
Enregistrer un commentaire