GameUserSettings failing to cast

Fatal error: [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.5\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 11]
Cast of GameUserSettings /Engine/Transient.GameUserSettings_0 to SmashyGameUserSettings failed

The above error causes a break when i try to launch my game from within the editor. VS2013 compiles everything correctly with no errors or warnings, i can edit content and do basically anything i like within the editor. As soon as i hit play, the program breaks to the above.

I’ve isolated it (i think) to the fact that SmashyGameUserSettings is not returning a value (says it can’t read memory) for the variables GraphicsQuality and bIsLanMatch.

SmashyGameUserSettings source: http://pastie.org/private/zpd2kkqqoenzrtbtes0e8a

SmashyGameUserSettings header: http://pastie.org/private/k8stg8spgajltne39yfkw

As you can see from the above files, both those variables are definitely being set. So i’m not sure why they’re returning null.

#DefaultEngine.ini Config Settings

Are you telling UE4 to use your custom class via config file?

[/Script/Engine.Engine]
UserSettingsClassName=/Script/YourGame.YourUserSettings

Rama

1 Like

I had done this two days ago, but i’d made a typo in that line and didn’t find it until last night. Thanks for helping!

You’re welcome!

If your issue is resolved please click the checkmark next to my answer so Epic knows it is resolved too :slight_smile:

Rama

Done and done!

Just to update this thread, it’s: “GameUserSettingsClassName”

1 Like