Quantcast
Channel: Latest Questions by MasterBLB
Viewing all articles
Browse latest Browse all 44

Console message meaning

$
0
0
What exactly means such console message: "GUI Window tries to begin rendering while something else has not finished rendering! Either you have a recursive OnGUI rendering, or previous OnGUI did not clean up properly." The code what causes it to appear is: public class MenuCode : MonoBehaviour { enum menuStates { mainMenu=0, difficultyChoose, options, geoscape } menuStates currentMenuState; public GUISkin geoscapeSkin; void Awake() { currentMenuState=menuStates.mainMenu; Screen.showCursor=true; } void OnGUI() { switch(currentMenuState) { case menuStates.mainMenu: createMainMenu(); break; case menuStates.geoscape: break; } } void createMainMenu() { GUI.skin=geoscapeSkin; if(GUI.Button(new Rect(Screen.width/2,Screen.height/2,285,62),"NEW CAMPAIGN")) button1Click(); GUI.Button(new Rect(Screen.width/2,Screen.height/2+67,285,62),"CONTINUE GAME"); } }

Viewing all articles
Browse latest Browse all 44

Trending Articles



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