unity3d - Wait function on Unity -


i want wait until "next" button pressed continue

child.addchild(tmp); childrenadded.push(tmp); neighbor.getcomponent.<renderer>().material.maintexture = null;                      -wait until click on next button continue-  toexpand.push(tmp); 

any idea? tried:

while(true) {     if(gui.button(rect(500,680 ,100,30),"next"))         break     } 

but doesn't work; freezes.

instead of waiting, can have code called when button clicked, this:

void ongui() {     if(gui.button(rect(500,680 ,100,30),"next"))                                 toexpand.push(tmp);     } } 

if possible, consider using unity 4.6 or later can use new ui easier work with.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -