A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
VRExpansionPlugin.cpp
Go to the documentation of this file.
1// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
2
3#include "VRExpansionPlugin.h"
4
6
7#include "VRGlobalSettings.h"
8#include "ISettingsContainer.h"
9#include "ISettingsModule.h"
10#include "ISettingsSection.h"
11
12#define LOCTEXT_NAMESPACE "FVRExpansionPluginModule"
13
15{
16 // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
18
19#if PHYSICS_INTERFACE_PHYSX
20 FPhysScene_PhysX::PhysicsReplicationFactory = MakeShared<IPhysicsReplicationFactoryVR>();
21 FPhysScene_PhysX::ContactModifyCallbackFactory = MakeShared<IContactModifyCallbackFactoryVR>();
22 FPhysScene_PhysX::CCDContactModifyCallbackFactory = MakeShared<ICCDContactModifyCallbackFactoryVR>();
23 //FPhysScene_ImmediatePhysX::PhysicsReplicationFactory = MakeShared<IPhysicsReplicationFactoryVR>();
24#elif WITH_CHAOS
25 FPhysScene_Chaos::PhysicsReplicationFactory = MakeShared<IPhysicsReplicationFactoryVR>();
26#endif
27}
28
30{
31 // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
32 // we call this function before unloading the module.
34}
35
37{
38 if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
39 {
40 // Create the new category
41 ISettingsContainerPtr SettingsContainer = SettingsModule->GetContainer("Project");
42
43
44 SettingsModule->RegisterSettings("Project", "Plugins", "VRExpansionPlugin",
45 LOCTEXT("VRExpansionSettingsName", "VRExpansion Settings"),
46 LOCTEXT("VRExpansionSettingsDescription", "Configure global settings for the VRExpansionPlugin"),
47 GetMutableDefault<UVRGlobalSettings>());
48 }
49}
50
52{
53 // Ensure to unregister all of your registered settings here, hot-reload would
54 // otherwise yield unexpected results.
55 if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
56 {
57 SettingsModule->UnregisterSettings("Project", "Plugins", "VRExpansionPlugin");
58 }
59}
60
61#undef LOCTEXT_NAMESPACE
62
IMPLEMENT_MODULE(FOpenXRExpansionEditorModule, OpenXRExpansionEditor)
virtual void ShutdownModule() override
virtual void StartupModule() override