Game Development Community

GUIUtil does not exist in current context

by fairuz · in · 10/05/2008 (9:57 am) · 3 replies

Hello,

On page 334, 5th lines from the bottom is giving me a "GUIUtil does not exist in current context" error.

Any thoughts on this?

TIA.

#1
10/06/2008 (6:22 pm)
I have the same problem. I haven't found a solution yet.
#2
10/07/2008 (12:17 pm)
Are you referring to this?

protected override void BeginRun()
{
base.BeginRun();
// show the splash screen
GUIUtil.InitGUIScreens("StarterGame");
GUICanvas.Instance.SetContentControl("GuiSplashScreen");
}

Unfortunately, the engine code changed without the book being updated. The method should look more like this:

protected override void BeginRun()
{
     base.BeginRun();
      
     // show the splash screen
     GuiSplashScreen splash = new GuiSplashScreen()
     GUICanvas.Instance.SetContentControl(splash);
}

Try something like this...

John K.
#3
10/08/2008 (7:37 am)
Thanks John. It's working now.