Unity Editor can't find IEnumerated
Hey, I have the following Problem: I want to add a delay to my script. For this I want to use a IEnumerated Method. But Monodevelope doesn't recognize IEnumerated (marked red) and I get the folowing Error code:
Assets/Scripts/GameManager.cs(28,9): error CS0246: The type or namespace name `IEnumerated' could not be found. Are you missing an assembly reference?
This is my script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour {
public Transform thePlatformGenerator;
private Vector3 theplatformGeneratorStartPoint;
public Transform thePlayer;
private Vector3 thePlayerStartPoint;
private PlatformDestructor[] platformList;
// Use this for initialization
void Start () {
theplatformGeneratorStartPoint = thePlatformGenerator.position;
thePlayerStartPoint = thePlayer.position;
}
// Update is called once per frame
void Update () {
}
public void RestartGame(){
StartCoroutine ("RestartGameCo");
}
public IEnumerated RestartGameCo(){
yield return WaitForSeconds (1.0f);
thePlayer.position = thePlayerStartPoint;
thePlatformGenerator.position = theplatformGeneratorStartPoint;
platformList = FindObjectsOfType<PlatformDestructor> ();
for (int x = 0; x < 100; x++) {
Destroy(platformList[x].gameObject);
}
}
}
Can anyone help my to fix the Problem?
Your answer
Follow this Question
Related Questions
IEnumerator instead of LateUpdate in unity 1 Answer
IEnumerator inner functions 0 Answers
"Can't add script behaviour AICharacterControl. The script needs to derive from MonoBehaviour!" ? 2 Answers
"Can't add script behaviour AICharacterControl. The script needs to derive from MonoBehaviour!" ? 0 Answers
[C#] Coroutine just won't stop! 2 Answers