Quantcast
Channel: Questions in topic: "invokerepeating"
Viewing all articles
Browse latest Browse all 220

How can I call a new class function with InvokeRepeating ?

$
0
0
public class CheckInRange{ public IEnumerator loopCheckInRange(){ timer += 1; Debug.Log (timer); yield return new WaitForSeconds (0.2f); } } --------------------------------------------------------------------------------------------------------------------------------------------------------- In the other class: public class test : MonoBehaviour { public CheckInRange checkInrange = new CheckInRange (); // Use this for initialization void Start () { InvokeRepeating("checkInrange.loopCheckInRange",0f,0.2f); } }

Viewing all articles
Browse latest Browse all 220

Trending Articles



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