- Home /
Question by
0mr_ashutosh0 · Dec 07, 2014 at 02:27 PM ·
uicanvasyieldwaitforsecondsyield waitforseconds
Custom Script and Controls for Canvas UI button ??
I CAN NOT USE IENUMERATOR and yield WITH CANVAS BUTTON !!!!!!
the thing is play button (canvas UI) calls a function 'changeScene(string nexttScene) and passes a string ( name of next scene ) to the gameManager object which is set by onClick thing of canvas UI.
Now since there is a IEnumerator in the changeScene function which calls a fader script to fadeIn and fadeOut the scene and yields for 3 seconds. but the scene changes Instantly.
how can i not use the default onClick and apply some custom script to canvas Button
please write the requireComponent, Getcomponent part and bring the control of button to the script. rest i can do.
Comment