Starting the coroutine with a value(string,int,bool, float and so on), is what you have to do normally.
example: StartCoroutine(OnTriggerEnter(1.0f));
and in IEnumerator OnTriggerEnter(float value) to make use of the value inside of the IEnumerator.
like: yield return new waitforseconds(value);
So you might want to store the collider somehow in a variable. Not sure if thats possible.
↧