I’m trying to take another look at this today and in the following section of code in the GameEngine.cpp implementation…
// Create game instance. For GameEngine, this should be the only GameInstance that ever gets created.
{
FStringClassReference GameInstanceClassName = GetDefault<UGameMapsSettings>()->GameInstanceClass;
UClass* GameInstanceClass = (GameInstanceClassName.IsValid() ? LoadObject<UClass>(NULL, *GameInstanceClassName.ToString()) : UGameInstance::StaticClass());
GameInstance = ConstructObject<UGameInstance>(GameInstanceClass, this);
GameInstance->InitializeStandalone();
}
The GameInstanceClass variable is coming back NULL.
EDIT: I’m now stepping through and using the Immediate Window and for the name of the asset, I’m getting this which appears correct. I’ve substituted the name of the game with ‘CustomGameInstance’ instead.
FStringAssetReference: {AssetLongPathname=L"/Game/Core/Blueprints/CustomGameInstance.CustomGameInstance_C" }
But following that, the GameInstanceClass comes back NULL and the engine cant unfortunately construct it. The weird part is if I have the GameInstance Class in the Project Settings set to the default, one of my levels has some reference to it from past linker issues and also causes the project to crash upon opening the level. I need to jump on this one quick and I’m building 4.6.0 from source so once a fix is implemented, can you point me to the github commit so I can copy it over to the source on my PC, thanks and let me know if you guys need any more info.
Thanks!