UDK SettingsScene variable

Posted by Ricket on Stack Overflow See other posts from Stack Overflow or by Ricket
Published on 2010-03-27T22:01:09Z Indexed on 2010/03/27 22:03 UTC
Read the original article Hit count: 532

I am in the process of porting a script from UT3 to UDK. The script is for class ZOUIFrontEnd_MainMenu extends UTUIFrontEnd_MainMenu.

I'm getting the following compiler error:

C:\UDK\UDK-2010-03\Development\Src\FixIt\Classes\ZOUIFrontEnd_MainMenu.uc(18) : Error, Bad or missing expression in Call to 'OpenSceneByName', parameter 1

The referenced line is as follows:

OpenSceneByName(SettingsScene);

Okay, so I figured the OpenSceneByName function changed in UDK. Tracing the path of inheritance all the way up to UDKUIScene.uc, I found the definition:

function UIScene OpenSceneByName(string SceneToOpen, bool bSkipAnimation=false, optional delegate<OnSceneActivated> SceneDelegate=None)

Assuming SettingsScene is a string, everything looks fine, right? So I figured I would find SettingsScene to make sure it's a string. Well doing a search for "SettingsScene" in all files turned up only one other line; UTGameReplicationInfo.uc line 334:

UTPC.OpenUIScene(class'UTUIFrontEnd_MainMenu'.default.SettingsScene);

But UTUIFrontEnd_MainMenu doesn't have a SettingsScene variable in it! Just to check, I changed my line of code to match:

OpenSceneByName(class'UTUIFrontEnd_MainMenu'.default.SettingsScene);

And indeed, I get the following compile error now:

C:\UDK\UDK-2010-03\Development\Src\FixIt\Classes\ZOUIFrontEnd_MainMenu.uc(18) : Error, Unknown Property 'SettingsScene' in 'Class UTGame.UTUIFrontEnd_MainMenu'

How does UTGameReplicationInfo.uc successfully compile? Where is the SettingsScene variable?

© Stack Overflow or respective owner

Related posts about unreal-development-kit

Related posts about game-development