58 Log(
"Starting up PixoVR Multiplayer Module.");
62 FOnlineSubsystemModule& OSS = FModuleManager::GetModuleChecked<FOnlineSubsystemModule>(
"OnlineSubsystem");
65 if (!FModuleManager::Get().IsModuleLoaded(
"WebSockets"))
67 Log(
"WebSockets module was not loaded. Loading now.");
68 FModuleManager::Get().LoadModule(
"WebSockets");
71 if (!FModuleManager::Get().IsModuleLoaded(
"Agones"))
73 Log(
"Agones module was not loaded. Loading now.");
74 FModuleManager::Get().LoadModule(
"Agones");
77 if (!FModuleManager::Get().IsModuleLoaded(
"OnlineSubsystem"))
79 Log(
"OnlineSubsystem module was not loaded. Loading now.");
80 FModuleManager::Get().LoadModule(
"OnlineSubsystem");
83 if (!FModuleManager::Get().IsModuleLoaded(
"OnlineSubsystemUtils"))
85 Log(
"OnlineSubsystemUtils module was not loaded. Loading now.");
86 FModuleManager::Get().LoadModule(
"OnlineSubsystemUtils");
89 TArray<FName> ExistingOnlineSubsystemModules;
90 FModuleManager::Get().FindModules(TEXT(
"OnlineSubsystem*"), ExistingOnlineSubsystemModules);
92 if (ExistingOnlineSubsystemModules.Num() > 2)
94 ExistingOnlineSubsystemModules.Remove(
"OnlineSubsystem");
95 ExistingOnlineSubsystemModules.Remove(
"OnlineSubsystemUtils");
96 FString OnlineSubsystemModuleString;
97 for (
int ModuleIndex = 0; ModuleIndex < ExistingOnlineSubsystemModules.Num(); ModuleIndex++)
99 OnlineSubsystemModuleString += ExistingOnlineSubsystemModules[ModuleIndex].ToString() +
", ";
101 Error(
"There are additional Online Subsystems plugins that are enabled. Disable those plugins before using the PixoVR Multiplayer plugin.\n%s", *OnlineSubsystemModuleString);