Example!
This causes massive amounts of redscreen errors on startup and a crash when loading a game:
Code: Select all
class TestScreenListener extends UIScreenListener;
event OnInit(UIScreen screen)
{
local UIOutpostManagement baby;
if(screen.IsA('UIOutpostManagement'))
{
baby = UIOutpostManagement(screen);
}
}
defaultproperties
{
ScreenClass = none;
}
Code: Select all
class TestScreenListener extends UIScreenListener;
event OnInit(UIScreen screen)
{
local UIStrategyMap baby;
if(screen.IsA('UIStrategyMap'))
{
baby = UIStrategyMap(screen);
}
}
defaultproperties
{
ScreenClass = none;
}
I'm seeing nothing useful at all in the log so I'm kind of at a loss. Help from anyone would be very appreciated if you have a moment.
EDIT: I should also note that for some reason, this class is a bit temperamental and failing in ways the documentation says it should work as well, so it's possible not all is right with the world here. Setting ScreenClass to anything other than `none` causes a failure, and casting anything outside of the `IsA` block also doesn't work well. I have my environment set up as per here: https://www.reddit.com/r/xcom2mods/comm ... ong_war_2/
EDIT2: Okay so I reinstalled the SDK and created a non-lw2 based mod and the problems mentioned in the edit went away so there's almost certainly something wonky going on with my build process here, and perhaps the steps mentioned in the reddit post above might not work quite right. I'll update as I go for documentation, but it no longer looks like a bug with lw2 modding specifically, and more my specific set-up.
EDIT3: It seems the problem comes when I add the unrealengine lines. So I guess the problem is I'm somehow not building my LW2 dependencies correctly?