How do i call out an IEnumerator from another script to a script which also contains IEnumerator?

It is a Game Manager.

public class gm : MonoBehaviour
public IEnumerator spawnTile() .....

I want this IEnumerator spawnTile to be called on this script

public class gmSidePlatform : MonoBehaviour
void Start()
{
    NextSpawnSidePlatform.x = 30.5f;
    StartCoroutine(SpawnSidePlatform());
}

IEnumerator SpawnSidePlatform()....

I did follow the instructions of calling other scripts by using “Public gm gameManager1;” but the variables from the gm script didnt appear on this(gmSidePlatform) script. I don’t know what to do…

just add a gm script

public class gmSidePlatform : MonoBehaviour
gm GM;
void Start()
{
    NextSpawnSidePlatform.x = 30.5f;
    GM.StartCoroutine(SpawnSidePlatform());
}

IEnumerator SpawnSidePlatform(
1 Like