本文整理汇总了C++中ISettingsModule类的典型用法代码示例。如果您正苦于以下问题:C++ ISettingsModule类的具体用法?C++ ISettingsModule怎么用?C++ ISettingsModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ISettingsModule类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShutdownModule
virtual void ShutdownModule() override
{
if (!Initialized)
{
return;
}
Initialized = false;
// unregister video player factory
IMediaModule* MediaModule = FModuleManager::GetModulePtr<IMediaModule>("Media");
if (MediaModule != nullptr)
{
MediaModule->UnregisterPlayerFactory(*this);
}
// unregister logging callback
FVlc::LogUnset(VlcInstance);
// release LibVLC instance
FVlc::Release((FLibvlcInstance*)VlcInstance);
VlcInstance = nullptr;
// shut down LibVLC
FVlc::Shutdown();
// unregister settings
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->UnregisterSettings("Project", "Plugins", "VlcMedia");
}
}
示例2: StartupModule
void FLogVisualizerModule::StartupModule()
{
FLogVisualizerStyle::Initialize();
FLogVisualizer::Initialize();
FVisualLoggerCommands::Register();
IModularFeatures::Get().RegisterModularFeature(VisualLoggerTabName, this);
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(
VisualLoggerTabName,
FOnSpawnTab::CreateRaw(this, &FLogVisualizerModule::SpawnLogVisualizerTab))
.SetGroup(WorkspaceMenu::GetMenuStructure().GetDeveloperToolsMiscCategory())
.SetDisplayName(NSLOCTEXT("LogVisualizerApp", "TabTitle", "Visual Logger"))
.SetTooltipText(NSLOCTEXT("LogVisualizerApp", "TooltipText", "Opens Visual Logger tool."))
.SetIcon(FSlateIcon(FLogVisualizerStyle::GetStyleSetName(), "LogVisualizerApp.TabIcon"));
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->RegisterSettings("Editor", "General", "VisualLogger",
LOCTEXT("AIToolsSettingsName", "Visual Logger"),
LOCTEXT("AIToolsSettingsDescription", "General settings for UE4 AI Tools."),
ULogVisualizerSettings::StaticClass()->GetDefaultObject()
);
}
}
示例3: StartupModule
virtual void StartupModule() override
{
// load required libraries
FHttpModule* HttpModule = FModuleManager::LoadModulePtr<FHttpModule>("Http");
if (HttpModule == nullptr)
{
UE_LOG(LogPhilipsHue, Log, TEXT("Failed to load Http module"));
return;
}
// register settings
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
ISettingsSectionPtr SettingsSection = SettingsModule->RegisterSettings("Project", "Plugins", "PhilipsHue",
LOCTEXT("PhilipsHueSettingsName", "Philips Hue"),
LOCTEXT("PhilipsHueSettingsDescription", "Configure the Philips Hue plug-in."),
GetMutableDefault<UPhilipsHueSettings>()
);
if (SettingsSection.IsValid())
{
SettingsSection->OnModified().BindRaw(this, &FPhilipsHueModule::HandleSettingsSaved);
}
}
}
示例4: StartupModule
virtual void StartupModule() override
{
// this is an example of a hotfix, declared here for no particular reason. Once we have other examples, it can be deleted.
#if 0
FCoreDelegates::GetHotfixDelegate(EHotfixDelegates::Test).BindRaw(this, &FWindowsTargetPlatformModule::HotfixTest);
#endif
TargetSettings = NewObject<UWindowsTargetSettings>(GetTransientPackage(), "WindowsTargetSettings", RF_Standalone);
// We need to manually load the config properties here, as this module is loaded before the UObject system is setup to do this
GConfig->GetArray(TEXT("/Script/WindowsTargetPlatform.WindowsTargetSettings"), TEXT("TargetedRHIs"), TargetSettings->TargetedRHIs, GEngineIni);
// When this is initialized the UEnum for EMinimumSupportedOS hasn't been registered.
FString MinOSString;
if (GConfig->GetString(TEXT("/Script/WindowsTargetPlatform.WindowsTargetSettings"), TEXT("MinimumOSVersion"), MinOSString, GEngineIni))
{
// We need to parse the string and compare manually.
TargetSettings->MinimumOSVersion = MinOSString == TEXT("MSOS_XP") ? EMinimumSupportedOS::MSOS_XP : EMinimumSupportedOS::MSOS_Vista;
}
TargetSettings->AddToRoot();
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->RegisterSettings("Project", "Platforms", "Windows",
LOCTEXT("TargetSettingsName", "Windows"),
LOCTEXT("TargetSettingsDescription", "Settings for Windows target platform"),
TargetSettings
);
}
}
示例5: StartupModule
virtual void StartupModule( ) override
{
if (!SupportsSlateRemote())
{
return;
}
// register settings
ISettingsModule* SettingsModule = ISettingsModule::Get();
if (SettingsModule != nullptr)
{
FSettingsSectionDelegates SettingsDelegates;
SettingsDelegates.ModifiedDelegate = FOnSettingsSectionModified::CreateRaw(this, &FSlateRemoteModule::HandleSettingsSaved);
SettingsModule->RegisterSettings("Project", "Plugins", "SlateRemote",
LOCTEXT("SlateRemoteSettingsName", "Slate Remote"),
LOCTEXT("SlateRemoteSettingsDescription", "Configure the Slate Remote plug-in."),
GetMutableDefault<USlateRemoteSettings>(),
SettingsDelegates
);
}
// register application events
FCoreDelegates::ApplicationHasReactivatedDelegate.AddRaw(this, &FSlateRemoteModule::HandleApplicationHasReactivated);
FCoreDelegates::ApplicationWillDeactivateDelegate.AddRaw(this, &FSlateRemoteModule::HandleApplicationWillDeactivate);
RestartServices();
}
示例6: RegisterContentEditorsSettings
/**
* Registers Other Tools settings
*/
void RegisterContentEditorsSettings( ISettingsModule& SettingsModule )
{
// content browser
SettingsModule.RegisterSettings("Editor", "ContentEditors", "ContentBrowser",
LOCTEXT("ContentEditorsContentBrowserSettingsName", "Content Browser"),
LOCTEXT("ContentEditorsContentBrowserSettingsDescription", "Change the behavior of the Content Browser."),
GetMutableDefault<UContentBrowserSettings>()
);
// destructable mesh editor
/* SettingsModule.RegisterSettings("Editor", "ContentEditors", "DestructableMeshEditor",
LOCTEXT("ContentEditorsDestructableMeshEditorSettingsName", "Destructable Mesh Editor"),
LOCTEXT("ContentEditorsDestructableMeshEditorSettingsDescription", "Change the behavior of the Destructable Mesh Editor."),
GetMutableDefault<UDestructableMeshEditorSettings>()
);*/
// graph editors
SettingsModule.RegisterSettings("Editor", "ContentEditors", "GraphEditor",
LOCTEXT("ContentEditorsGraphEditorSettingsName", "Graph Editors"),
LOCTEXT("ContentEditorsGraphEditorSettingsDescription", "Customize Anim, Blueprint and Material Editor."),
GetMutableDefault<UGraphEditorSettings>()
);
// graph editors
SettingsModule.RegisterSettings("Editor", "ContentEditors", "BlueprintEditor",
LOCTEXT("ContentEditorsBlueprintEditorSettingsName", "Blueprint Editor"),
LOCTEXT("ContentEditorsGraphBlueprintSettingsDescription", "Customize Blueprint Editors."),
GetMutableDefault<UBlueprintEditorSettings>()
);
}
示例7: StartupModule
void FGameplayDebuggerModule::StartupModule()
{
// This code will execute after your module is loaded into memory (but after global variables are initialized, of course.)
FWorldDelegates::OnPostWorldInitialization.AddRaw(this, &FGameplayDebuggerModule::OnWorldInitialized);
UGameplayDebuggerConfig* SettingsCDO = UGameplayDebuggerConfig::StaticClass()->GetDefaultObject<UGameplayDebuggerConfig>();
if (SettingsCDO)
{
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule)
{
SettingsModule->RegisterSettings("Project", "Engine", "GameplayDebugger",
NSLOCTEXT("GameplayDebuggerModule", "SettingsName", "Gameplay Debugger"),
NSLOCTEXT("GameplayDebuggerModule", "SettingsDescription", "Settings for the gameplay debugger tool."),
SettingsCDO);
}
if (SettingsCDO->bEnableExtension_GameHUD)
{
AddonManager.RegisterExtension("GameHUD", FOnGetExtension::CreateStatic(&FGameplayDebuggerExtension_HUD::MakeInstance));
}
if (SettingsCDO->bEnableExtension_Spectator)
{
AddonManager.RegisterExtension("Spectator", FOnGetExtension::CreateStatic(&FGameplayDebuggerExtension_Spectator::MakeInstance));
}
AddonManager.NotifyExtensionsChanged();
}
}
示例8: UnregisterSettings
/**
* Unregisters all settings.
*/
void UnregisterSettings( )
{
ISettingsModule* SettingsModule = ISettingsModule::Get();
if (SettingsModule != nullptr)
{
SettingsModule->UnregisterViewer("Editor");
// general settings
SettingsModule->UnregisterSettings("Editor", "General", "InputBindings");
SettingsModule->UnregisterSettings("Editor", "General", "LoadingSaving");
SettingsModule->UnregisterSettings("Editor", "General", "GameAgnostic");
SettingsModule->UnregisterSettings("Editor", "General", "UserSettings");
SettingsModule->UnregisterSettings("Editor", "General", "AutomationTest");
SettingsModule->UnregisterSettings("Editor", "General", "Experimental");
// level editor settings
SettingsModule->UnregisterSettings("Editor", "LevelEditor", "PlayIn");
SettingsModule->UnregisterSettings("Editor", "LevelEditor", "Viewport");
// other tools
SettingsModule->UnregisterSettings("Editor", "ContentEditors", "ContentBrowser");
// SettingsModule->UnregisterSettings("Editor", "ContentEditors", "DestructableMeshEditor");
SettingsModule->UnregisterSettings("Editor", "ContentEditors", "GraphEditor");
}
}
示例9: HandleSpawnSettingsTab
// Handles creating the editor settings tab.
TSharedRef<SDockTab> HandleSpawnSettingsTab( const FSpawnTabArgs& SpawnTabArgs )
{
ISettingsModule* SettingsModule = ISettingsModule::Get();
TSharedRef<SWidget> SettingsEditor = SNullWidget::NullWidget;
if (SettingsModule != nullptr)
{
ISettingsContainerPtr SettingsContainer = SettingsModule->GetContainer("Editor");
if (SettingsContainer.IsValid())
{
ISettingsEditorModule& SettingsEditorModule = ISettingsEditorModule::GetRef();
ISettingsEditorModelRef SettingsEditorModel = SettingsEditorModule.CreateModel(SettingsContainer.ToSharedRef());
SettingsEditor = SettingsEditorModule.CreateEditor(SettingsEditorModel);
SettingsEditorModelPtr = SettingsEditorModel;
}
}
return SNew(SDockTab)
.TabRole(ETabRole::NomadTab)
[
SettingsEditor
];
}
示例10: ShutdownModule
void FGameAnalyticsEditor::ShutdownModule()
{
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if( SettingsModule != nullptr )
{
SettingsModule->UnregisterSettings( "Project", "Plugins", "GameAnalytics" );
}
}
示例11: ShutdownModule
void FEditorLiveStreaming::ShutdownModule()
{
// Unregister settings
ISettingsModule* SettingsModule = ISettingsModule::Get();
if( SettingsModule != nullptr )
{
SettingsModule->UnregisterSettings( "Editor", "General", "EditorLiveStreaming" );
}
}
示例12: ShutdownModule
virtual void ShutdownModule() override
{
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->UnregisterSettings("Project", "Platforms", "iOS");
}
}
示例13: ShutdownModule
virtual void ShutdownModule() override
{
ISettingsModule* SettingsModule = ISettingsModule::Get();
if (SettingsModule != nullptr)
{
SettingsModule->UnregisterSettings("Project", "Platforms", "Android");
}
}
示例14: StartupModule
virtual void StartupModule() override
{
// register settings detail panel customization
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyModule.RegisterCustomClassLayout(
"IOSRuntimeSettings",
FOnGetDetailCustomizationInstance::CreateStatic(&FIOSTargetSettingsCustomization::MakeInstance)
);
FOnUpdateMaterialShaderQuality UpdateMaterials = FOnUpdateMaterialShaderQuality::CreateLambda([]()
{
FGlobalComponentRecreateRenderStateContext Recreate;
FlushRenderingCommands();
UMaterial::AllMaterialsCacheResourceShadersForRendering();
UMaterialInstance::AllMaterialsCacheResourceShadersForRendering();
});
PropertyModule.RegisterCustomClassLayout(
UShaderPlatformQualitySettings::StaticClass()->GetFName(),
FOnGetDetailCustomizationInstance::CreateStatic(&FMaterialShaderQualitySettingsCustomization::MakeInstance, UpdateMaterials)
);
PropertyModule.NotifyCustomizationModuleChanged();
// register settings
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->RegisterSettings("Project", "Platforms", "iOS",
LOCTEXT("RuntimeSettingsName", "iOS"),
LOCTEXT("RuntimeSettingsDescription", "Settings and resources for the iOS platform"),
GetMutableDefault<UIOSRuntimeSettings>()
);
{
static FName NAME_OPENGL_ES2_IOS(TEXT("GLSL_ES2_IOS"));
const UShaderPlatformQualitySettings* IOSMaterialQualitySettings = UMaterialShaderQualitySettings::Get()->GetShaderPlatformQualitySettings(NAME_OPENGL_ES2_IOS);
SettingsModule->RegisterSettings("Project", "Platforms", "iOSES2Quality",
LOCTEXT("IOSES2QualitySettingsName", "iOS Material Quality - ES2"),
LOCTEXT("IOSES2QualitySettingsDescription", "Settings for iOS ES2 material quality"),
IOSMaterialQualitySettings
);
}
{
static FName NAME_SF_METAL(TEXT("SF_METAL"));
const UShaderPlatformQualitySettings* IOSMaterialQualitySettings = UMaterialShaderQualitySettings::Get()->GetShaderPlatformQualitySettings(NAME_SF_METAL);
SettingsModule->RegisterSettings("Project", "Platforms", "iOSMetalQuality",
LOCTEXT("IOSMetalQualitySettingsName", "iOS Material Quality - Metal"),
LOCTEXT("IOSMetalQualitySettingsDescription", "Settings for iOS Metal material quality"),
IOSMaterialQualitySettings
);
}
}
}
示例15: ShutdownModule
void FIntroTutorials::ShutdownModule()
{
if (!bDisableTutorials && !IsRunningCommandlet())
{
FSourceCodeNavigation::AccessOnCompilerNotFound().RemoveAll( this );
FAssetToolsModule* AssetToolsModule = FModuleManager::GetModulePtr<FAssetToolsModule>("AssetTools");
if (AssetToolsModule)
{
IAssetTools& AssetTools = AssetToolsModule->Get();
for(const auto& RegisteredClassTypeAction : RegisteredClassTypeActions)
{
AssetTools.UnregisterClassTypeActions(RegisteredClassTypeAction);
}
}
}
if (BlueprintEditorExtender.IsValid() && FModuleManager::Get().IsModuleLoaded("Kismet"))
{
FBlueprintEditorModule& BPEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
BPEditorModule.GetMenuExtensibilityManager()->RemoveExtender(BlueprintEditorExtender);
}
if (MainMenuExtender.IsValid() && FModuleManager::Get().IsModuleLoaded("LevelEditor"))
{
FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>( "LevelEditor" );
LevelEditorModule.GetMenuExtensibilityManager()->RemoveExtender(MainMenuExtender);
}
if (FModuleManager::Get().IsModuleLoaded("MainFrame"))
{
IMainFrameModule& MainFrameModule = FModuleManager::LoadModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
MainFrameModule.OnMainFrameCreationFinished().RemoveAll(this);
}
ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
if (SettingsModule != nullptr)
{
SettingsModule->UnregisterSettings("Editor", "General", "Tutorials");
SettingsModule->UnregisterSettings("Project", "Engine", "Tutorials");
}
if(FModuleManager::Get().IsModuleLoaded("PropertyEditor"))
{
FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyEditorModule.UnregisterCustomPropertyTypeLayout("TutorialContent");
PropertyEditorModule.UnregisterCustomPropertyTypeLayout("TutorialWidgetReference");
PropertyEditorModule.UnregisterCustomClassLayout("EditorTutorial");
}
if(ContentIntroCurve.IsValid())
{
ContentIntroCurve.Get()->RemoveFromRoot();
ContentIntroCurve = nullptr;
}
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(TEXT("TutorialsBrowser"));
}