Hello.
Does any of you know script of appearing and disappearing enemy (or object) ?
I mean for example if someone walk, each time something appear in front of player for few seconds and disappear.
I searched forums and I couldnt find this kind of script. If I found, it wasn’t this what I was expecting.
1 Answer
1Hi mate,
I’m on the iPad so I can’t give you the exact answer but try in your update method something like
my_timer = 0;
flash_time = 5.0f; // time you want object to disappear
my_timer += Time.fixedDeltaTime;
If (my_timer >= flash_time)
transform.gameObject.SetActive = false;
This will only turn it off, but should get you going…