Skip to content

Instantly share code, notes, and snippets.

@arkms arkms/cUpdate
Created Oct 5, 2016

Embed
What would you like to do?
Costum Update with delays between every call
//Intervalo entre cada Update,, la ventaja es que podemos cambiar
//su valor ya sea dentro del mismo cUpdate o desde otra función.
float intervalos = 0.5f;
void Start()
{
StartCoroutine(cUpdate());
}
IEnumerator cUpdate()
{
while(true)
{
//Codigo
print("accion");
//Esperamos el tiempo definido que tenga 'intervalo'
yield return new WaitForSeconds(intervalos);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.