Question by
danielmoshbit · Sep 25, 2017 at 09:22 PM ·
error message
BCE0019: 'enabled' is not a member of 'UnityEngine.Component'
Hi, I just finished my project but after I wanted to build it as a WebGL this error shows up in one of my scripts(java).
var EnemyHealth : int = 10;
var Zombie : GameObject;
function Points (DamageAmount : int) {
EnemyHealth -= DamageAmount;
}
function Update () {
if (EnemyHealth <= 0) {
this.GetComponent("ZombieFollow").enabled = false;
Zombie.GetComponent.<Animation>().Play("back_fall");
EndZombie();
}
}
function EndZombie () {
yield WaitForSeconds(1.13); //Umfall Animation
Destroy(gameObject);
}
I hope someone could help me
Comment