Hi
I wanted to know how to delay a line of code from activating for a ceratin amount of time
It’s function is basically to 1: allow me to swap a weapon out of sight
and 2: when a certain number of seconds have passed make the object invisible.
I have looked into the “WaitForSeconds” type but haven’t had much luck in using it.
Ideally It would be great to make a method that delayed the invisibility so I could just call it up as and when i need it (which I tried doing)…
void wait(){}
IEnumerator WaitUp(){
{
yield return new WaitForSeconds(10);
print("im_not_doing_anything");
}
}
So firstly am I using this correctly and is there a better more effective way of pulling this off for instance maybe something like a “wait until animation is played” function similar to the animation “QueMode’s” but for invisibility?