I have a simple code where when a bullet hits an object, it does damage and it gets destroyed. It works perfectly in the Unity editor, but when I build and install on an iOS device, it won’t work. Everything else seems to work fine.
here is the code:
public class BulletDamage : MonoBehaviour {
void Start()
{
}
void OnTriggerEnter(Collider other)
{
if (other.tag == "EnemyBoss")
{
other.GetComponent<EnemyHealth> ().DoDamage (5);
Destroy(gameObject);
}
}
}