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
Post a Comment