Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Yield Coroutine error

$
0
0
So I've been getting some help on Unity Answers about inputting yield and coroutines in my code. (http://answers.unity3d.com/questions/446167/yield-script-update-error.html) Right now, the start of my code looks like this. void Start () { OSCHandler.Instance.Init (); servers = new Dictionary (); particleSystem.emissionRate = 0; StartCoroutine(BongoClap()); } IEnumerator BongoClap () { while (true) { // Rest of my code... However, now I'm getting an error. > Assets/Scripts/UnityOSC-master/BoncoClapScript.cs(78,51): error CS0019: Operator `||' cannot be applied to operands of type `bool' and `UnityEngine.KeyCode' It seems to be having a problem with the || operators in this line of code... if (Input.GetKeyDown (KeyCode.JoystickButton0) || (KeyCode.JoystickButton1) || (KeyCode.JoystickButton2) || (KeyCode.JoystickButton3)) { yield return new WaitForSeconds(5.0f); yield return null; } Any idea why this might be happening? :S

Viewing all articles
Browse latest Browse all 171066

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>