انا للاستاذ من المتابعين ولكن ما معنا ال(js) وانا عندما اعمل ملف سكربت وافتحة الاقي start void شنو معنا (انا ما اعرف الغة السي شارب وانا اريد معرفتي تقتصر على فقط معرفة الدوال والاكواد المستخدمة فقط في العاب )
وشكرا لكم
وشكرا لكم
Invoke ("myPrintFunction"); Function Update (){ If (!IsInvoking(“myPrintFunction”){ // it returns False Yield WaitForSeconds (5); Debug.Log (“the myPrintFunction is not running now & 5 seconds passed , we will start again”); Invoke(“myPrintFunction”); } } function myPrintFunction (){ Debug.Log ("my invoke working correctly Now); }
function Start () { yield WaitForSeconds (2); Destroy (this.gameObject); } function OnDestroy(){ Debug.Log ("our object successfully destroyed"); }
our object successfully destroyed
Script error: OnDestroy() can not be a coroutine.
تعليق