diff --git a/Source/Calibratio/Private/Calibratio.cpp b/Source/Calibratio/Private/Calibratio.cpp index a3a085b211c93c002c619d4e1264a8945deea291..536839479370b41b1060ab4fe2db7711ebce7055 100644 --- a/Source/Calibratio/Private/Calibratio.cpp +++ b/Source/Calibratio/Private/Calibratio.cpp @@ -25,8 +25,8 @@ void FCalibratioModule::StartupModule () /* Register cluster event listening */ - IDisplayClusterClusterManager* ClusterManager = IDisplayCluster::Get().GetClusterMgr(); - if (ClusterManager && !ClusterEventListenerDelegate.IsBound()) + IDisplayCluster* DisplayCluster = FModuleManager::LoadModulePtr<IDisplayCluster>(IDisplayCluster::ModuleName); + if (DisplayCluster && !ClusterEventListenerDelegate.IsBound()) { ClusterEventListenerDelegate = FOnClusterEventJsonListener::CreateLambda([](const FDisplayClusterClusterEventJson& Event) { @@ -35,7 +35,7 @@ void FCalibratioModule::StartupModule () SpawnCalibratio(); } }); - ClusterManager->AddClusterEventJsonListener(ClusterEventListenerDelegate); + DisplayCluster->GetClusterMgr()->AddClusterEventJsonListener(ClusterEventListenerDelegate); } } void FCalibratioModule::ShutdownModule() diff --git a/Source/RWTHVRToolkit/Private/Cluster/ClusterConsole.cpp b/Source/RWTHVRToolkit/Private/Cluster/ClusterConsole.cpp index 966f4f01cd87adbb2318c49411c9b69b343cc9c0..55a3ad97794a59d04cd2e9fa9a8531152e39071a 100644 --- a/Source/RWTHVRToolkit/Private/Cluster/ClusterConsole.cpp +++ b/Source/RWTHVRToolkit/Private/Cluster/ClusterConsole.cpp @@ -21,8 +21,8 @@ void FClusterConsole::Register() })); /* Register cluster event handling */ - IDisplayClusterClusterManager* ClusterManager = IDisplayCluster::Get().GetClusterMgr(); - if (ClusterManager && !ClusterEventListenerDelegate.IsBound()) + IDisplayCluster* DisplayCluster = FModuleManager::LoadModulePtr<IDisplayCluster>(IDisplayCluster::ModuleName); + if (DisplayCluster && !ClusterEventListenerDelegate.IsBound()) { ClusterEventListenerDelegate = FOnClusterEventJsonListener::CreateLambda([](const FDisplayClusterClusterEventJson& Event) { @@ -32,7 +32,7 @@ void FClusterConsole::Register() GEngine->Exec(GEngine->GetCurrentPlayWorld(), *Event.Parameters["Command"]); } }); - ClusterManager->AddClusterEventJsonListener(ClusterEventListenerDelegate); + DisplayCluster->GetClusterMgr()->AddClusterEventJsonListener(ClusterEventListenerDelegate); } }