Pass more than one parameter for StartCoroutine

Is it possible to pass more than one parameter for StartCoroutine?

If not, is it better to pass a list or other object or just a string to parse for multiple parameters?

There are two ways to use StartCoroutine.
This one:
function StartCoroutine (methodName : String, value : object = null) : Coroutine
…will only take one value object.

The other:
function StartCoroutine (routine : IEnumerator) : Coroutine
…will take as many as your routine has. Try using this one if you need multiple parameters.


 void Start() {
     StartCoroutine(CoroutineWithMultipleParameters(1.0F, 2.0F, "foo"));
  IEnumerator CoroutineWithMultipleParameters(float aNum, float bNum, string aWord){

Posting a reply to this question because I had the same doubt some months ago, I hope that this will be useful to somebody.

You can pass a Array as a parameter and inside the Coroutine you just read its nodes. You’ll need to cast your parameters inside the coroutine. Something like this:
using UnityEngine;
using System.Collections;

// pass the parameters inside a object[] (Array)
void CallCoroutine()
		float floatParameter = 1.43434f;
		string stringParameter = "blablabla";
		object[] parms = new object[2]{floatParameter, stringParameter};
		StartCoroutine("MyCoroutine", parms);

void StopCoroutine()

IEnumerator MyCoroutine(object[] parms)
		bool achieved = false;
		float floatParameter = (float)parms[0];
		string stringParameter = (string)parms[1];
		while(achieved == false){
			if( ---- something -----){
				achieved = true;
			yield return null;

This method has worked for me, but it doesn’t seem to work for me when I try to call a Coroutine that’s in another script, even when my IEnumerator is public.

I can find a “workaround” by calling a function and passing in all the variables I need, that in turn calls the Coroutine (this time inside the same script as the IEnumerator) with all the variables I need, but it’s much cleaner to simply call the Coroutine with the variables I need, and I’d love to do that.

I was going to make this a comment but apparently I don’t have permission to comment.