Hi! I am working on a 2P game were some stages must be vertical split and other must be horizontal split and others full screen. But I am just having problems to switch layout from Horizontal to Vertical.
Googling I found a code like this but I apply and I get an error. This is my code:
#include "LevelMap.h"
#include "GameMapsSettings.h"
void ALevelMap::switchSplitLayout()
{
UGameMapsSettings* Settings = const_cast<UGameMapsSettings*>(GetDefault<UGameMapsSettings>());
if (Settings->TwoPlayerSplitscreenLayout == ETwoPlayerSplitScreenType::Horizontal)
{
Settings->TwoPlayerSplitscreenLayout = ETwoPlayerSplitScreenType::Vertical;
}
else { Settings->TwoPlayerSplitscreenLayout = ETwoPlayerSplitScreenType::Horizontal; }
}
This is the error y get:
LNK2019: unresolved external symbol "__declspec(dllimport) private: static class UClass * __cdecl UGameMapsSettings::GetPrivateStaticClass(void)" (__imp_?GetPrivateStaticClass@UGameMapsSettings@@CAPEAVUClass@@XZ) referenced in function "public: void __cdecl AMyLevelScriptActor::switchSplitLayout(void)" (?switchSplitLayout@AMyLevelScriptActor@@QEAAXXZ)
LNK1120: 1 unresolved externals
any clue?