Home > other >  Use U3D5. X version of the above, why would an error
Use U3D5. X version of the above, why would an error

Time:09-25

Void the Start () {

While (true) {
Instantiate (playerbullet, transform the position, the transform. The rotation);

Yield return new WaitForSeconds (0.05 f);
}

Error: The body of ` player. The Start () 'always be an iterator block because ` void' is not an iterator interface type

CodePudding user response:

Void - & gt; IEnumerator

CodePudding user response:

Although u3d just before contact, such as 1 l, this is compile grammar problem, your method returns void, results in the method you use the yield keyword, so you want to change your void to corresponding to the return type of collection
  • Related