# How to add custom settings in Project Settings?

**URL:** <https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [June 23, 2020, 4:55pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330 "2020-06-23T16:55:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![RowelCaps](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RowelCaps](https://forums.unrealengine.com/u/RowelCaps)\
**Post date:** [June 23, 2020, 4:55pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/1 "2020-06-23T16:55:03Z")

</div>

Hi. I’ve been trying to add a Custom Settings in Project Settings. I’ve found one tutorial on the web but it does not explain How do I get that data from it, How do I execute it to add on the project settings. It just shows the syntax lol. I’ve looked into the documentation and all my searches are just explaining the anatomy of the project settings in the editor. I may not know what specific word to search so maybe that’s why I can’t find it in the documentation.

---

<div class="post-metadata">

**Author:** ![coding2019](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@coding2019](https://forums.unrealengine.com/u/coding2019)\
**Post date:** [July 18, 2021, 8:54pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/2 "2021-07-18T20:54:56Z")

</div>

Hi there RowelCaps What is the name of the tutorial that you have found on the web?  
I’ll be happy to know since I want to add custom settings of my own to the project settings window.

---

<div class="post-metadata">

**Author:** ![DevinSherry](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/devinsherry/32/1101099_2.png) [@DevinSherry](https://forums.unrealengine.com/u/DevinSherry)\
**Post date:** [July 19, 2021, 1:03pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/3 "2021-07-19T13:03:34Z")

</div>

Hi there!

I was able to accomplish this and I will do my best to explain what needs to be done, or at least what I did to get it to work. (I will also link my sources)

The first thing I did was follow these tutorials: [Unreal Engine 4 adds custom settings to project settings - Programmer Sought](https://www.programmersought.com/article/28727637398/) + [Plugins | Unreal Engine Documentation](https://docs.unrealengine.com/4.26/en-US/ProductionPipelines/Plugins/).

These tutorials show you how to create a plugin and how to set up your settings.

The plugin I created is called TestPlugin (.cpp/.h) and this is what the code looks like:

TestPlugin.h

```auto
// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"

class FTestPluginModule : public IModuleInterface
{
public:

	/** IModuleInterface implementation */
	virtual void StartupModule() override;
	virtual void ShutdownModule() override;
};

```

TestPlugin.cpp

```auto
// Copyright Epic Games, Inc. All Rights Reserved.

#include "TestPlugin.h"
#include "TestPlugin_Settings.h"
#include "ISettingsModule.h"

#define LOCTEXT_NAMESPACE "FTestPluginModule"

void FTestPluginModule::StartupModule()
{
	// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module

	if(ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
	{
		SettingsModule->RegisterSettings("Project", "Plugins", "TestPlugin_Settings",
			LOCTEXT("RuntimeSettingsName", "My Setting Page"), LOCTEXT("RuntimeSettingsDescription", "Configure my setting"),
			GetMutableDefault<UTestPlugin_Settings>());
	}
}

void FTestPluginModule::ShutdownModule()
{
	// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
	// we call this function before unloading the module.

	if(ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
	{
		SettingsModule->UnregisterSettings("Project", "Plugins", "TestPlugin_Settings");
	}
}

#undef LOCTEXT_NAMESPACE
	
IMPLEMENT_MODULE(FTestPluginModule, TestPlugin)

```

You also need to create a settings class (this class is referenced in the above code so make sure you have this as well before trying to compile anything). This settings class should derive from UObject, and in my case, I called it TestPlugin\_Settings (.cpp/.h)

TestPlugin\_Settings.h

```auto
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "TestPlugin_Settings.generated.h"

/**
 * 
 */
UCLASS(config = MySetting)
class TESTPLUGIN_API UTestPlugin_Settings : public UObject
{
	GENERATED_BODY()

public:
	UTestPlugin_Settings(const FObjectInitializer& obj);

	UPROPERTY(Config, EditAnywhere, Category = "My Custom Settings")
	bool CustomBoolFlag;

	UPROPERTY(Config, EditAnywhere, Category = "My Custom Settings")
	int32 CustomInteger;
};

```

TestPlugin\_Settings.cpp

```auto
#include "TestPlugin/Public/TestPlugin_Settings.h"

UTestPlugin_Settings::UTestPlugin_Settings(const FObjectInitializer& obj)
{
	CustomBoolFlag = false;
	CustomInteger = 0;
}

```

After you have created these classes, you should then add the plugin to your .uproject file; here is mine: [Please ignore all other plugins except for “TestPlugin”]

```auto
	"Plugins": [
		{
			"Name": "GameplayAbilities",
			"Enabled": true
		},
		{
			"Name": "DarkerNodes",
			"Enabled": true,
			"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/4b3441f0228a40ec9ca986489a5bd682"
		},
		{
			"Name": "MagicNode",
			"Enabled": true,
			"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/38f49e7411bc47588e0d219758d6b16f"
		},
		{
			"Name": "ElectronicNodes",
			"Enabled": true,
			"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/5cb2a394d0c04e73891762be4cbd7216"
		},
		{
			"Name": "TestPlugin",
			"Enabled": true,
			"MarketplaceURL": ""
		}
	]

```

Now you should be able to recompile, and after its done you should have these accessible properties:

![PluginsList](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/0/20b790f25e700157f5b2039ef43a63c649c851b5.png)

 ![Settings](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/1/d1a1c310cf929495de38c1ab4623bd116b76325c.png)

Now, in order to access these properties you need to do the following:

In your project’s build.cs file, you need to add the plugin. Here is mine:

```auto
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class Hero : ModuleRules
{
	public Hero(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "GameplayAbilities", "GameplayTags", "GameplayTasks", "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "UMG", "Slate", "SlateCore", "AIModule", "TestPlugin"});

        MinFilesUsingPrecompiledHeaderOverride = 1;
        bUseUnity = true;
    }
}

```

Now for my example, I am logging these two settings in the Output Log when my player character is possessed. First, I need to include the plugin:

> #include “TestPlugin/Public/TestPlugin\_Settings.h”

Then, I need to initialize a reference to the plugin. Again, I do this inside of the PossessedBy(AController\* New Controller) function within my character:

> UTestPlugin\_Settings\* Plugin\_Settings = GetMutableDefault\<UTestPlugin\_Settings\>();
> 
> if(Plugin\_Settings-\>CustomBoolFlag)  
> {  
> UE\_LOG(LogTemp, Warning, TEXT(“My Custom Bool = true”));  
> }  
> else  
> {  
> UE\_LOG(LogTemp, Warning, TEXT(“My Custom Bool = false”));  
> }
> 
> UE\_LOG(LogTemp, Warning, TEXT(“My Custom Integer = %i”), Plugin\_Settings-\>CustomInteger);

Now you should be able to compile and when my character is spawned/possessed, the log prints out:

![Log](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/2/229c3e3830aeed222b263a7f3860df890969dd95.png)  
Which matches the settings that I had earlier.

Here are my sources again that I used, and I hope this answers your question/was helpful. Good luck!

> **[Plugins](https://docs.unrealengine.com/4.26/en-US/ProductionPipelines/Plugins/)**
>
> How to create Unreal Engine plugins.

> **[Unreal Engine 4 adds custom settings to project settings - Programmer Sought](https://www.programmersought.com/article/28727637398/)**
>
> Unreal Engine 4 adds custom settings to project settings, Programmer Sought, the best programmer technical posts sharing site.

> **[UE4 如何写插件\_虚幻插件开发案例-CSDN博客](https://blog.csdn.net/u014532636/article/details/72765512)**
>
> 文章浏览阅读1.1w次，点赞9次，收藏25次。事先说明各个版本的插件写法还是有点区别的我的是基于4.15版本的。第一种：普通的插件然后添加一个CPP放在插件的Private下，命名为：插件名+PricatePCH.h文件 这里的插件名为Test，以下以Test为示例讲解：包含Test的.h文件#include "Test.h"在Test.cpp里把#include “Test.h” 替换成\_虚幻插件开发案例

> **[Creating Custom Modules | Orfeas Eleftheriou](https://www.orfeasel.com/creating-custom-modules/)**
>
> In this post we're going to see how to create a game module for Unreal Engine 4. Imagine that modules are containers for a collection of related classes. After you're done with this tutorial you can read more about the pros and cons of multiple...

> <https://stackoverflow.com/questions/62275619/how-do-i-include-plugin-source-files-in-my-custom-unreal-engine-module>

> **[How to reload plugin config?](https://forums.unrealengine.com/questions/934207/how-to-reload-plugin-config.html)**
>
> I have an ini file in my plugin’s config folder. In the case that this ini doesn’t contain the required information, I write to the file and put the default values for those parameters in the file. The problem I’m facing is that this change in the...

---

<div class="post-metadata">

**Author:** ![RCE\_WillPimentel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rce_willpimentel/32/960936_2.png) [@RCE\_WillPimentel](https://forums.unrealengine.com/u/RCE_WillPimentel)\
**Post date:** [February 4, 2022, 9:39pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/4 "2022-02-04T21:39:35Z")

</div>

Hey! Sorry to bump an old topic but I have to ask - will this same setup work for a packaged plugin (i.e. if I want to reuse my plugin for multiple projects)? Or are there some extra steps that I have to take to make it work? Thanks.

---

<div class="post-metadata">

**Author:** ![AaronK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aaronk/32/1183690_2.png) [@AaronK](https://forums.unrealengine.com/u/AaronK)\
**Post date:** [August 17, 2022, 7:28am UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/6 "2022-08-17T07:28:14Z")

</div>

Okay, so for anyone seeing this that may have the same issue. I wasn’t able to fix it using the ISettingsModule, but I stumbled upon what I assume is the currently intended way of doing it:  
Having my settings not derive from UObject, but rather UDeveloperSettings.  
For the categorization I just overrode the different getters for SectionName, SectionText etc.

Little note of caution for packaging:  
`GetSectionDescription()` and `GetSectionText()` need to be wrapped in a `#if WITH_EDITOR`, just like in the UDeveloperSettings class.

---

<div class="post-metadata">

**Author:** ![Azury](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/azury/32/88708_2.png) [@Azury](https://forums.unrealengine.com/u/Azury)\
**Post date:** [January 26, 2023, 11:13am UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/8 "2023-01-26T11:13:38Z")

</div>

This was amazing thank you!

---

<div class="post-metadata">

**Author:** ![lehuan5062](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lehuan5062](https://forums.unrealengine.com/u/lehuan5062)\
**Post date:** [February 14, 2023, 12:59pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/9 "2023-02-14T12:59:46Z")

</div>

> [@AaronK](#):
>
> Having my settings not derive from UObject, but rather UDeveloperSettings.

Using UDeveloperSettings makes my setting duplicated:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/2/8726868893522daf5f3dd2628e9943964187ca64.png)

---

<div class="post-metadata">

**Author:** ![lehuan5062](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lehuan5062](https://forums.unrealengine.com/u/lehuan5062)\
**Post date:** [February 14, 2023, 2:22pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/10 "2023-02-14T14:22:34Z")

</div>

I fixed it by removing the module method above and using these codes:

Header:

```auto
#pragma once

#include "Engine/DeveloperSettings.h"
#include "CurrencySetting.generated.h"

UCLASS(config = CurrencySystem, DefaultConfig)
class CURRENCYSYSTEMRUNTIME_API UCurrencySetting : public UDeveloperSettings
{
	GENERATED_BODY()

public:
	UCurrencySetting();

	UPROPERTY(Config, EditAnywhere, meta = (ClampMin = "0", UIMin = "0"))
		int StartingAmount;
};

```

CPP:

```auto
#include "CurrencySetting.h"

UCurrencySetting::UCurrencySetting() : StartingAmount{}
{
	CategoryName = "Plugins";

	SectionName = "Currency System";
}

```

Result:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/1/fd1044ce53308f33f209f2031efc9b8670f7683c.png)

---

<div class="post-metadata">

**Author:** ![NFU\_Dev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NFU\_Dev](https://forums.unrealengine.com/u/NFU_Dev)\
**Post date:** [August 25, 2023, 10:00am UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/11 "2023-08-25T10:00:22Z")

</div>

so by just creating a new class drived from UDeveloperSettings , i can get a new category ?  
i have used the method above this and it worked by the settings i set are not reflected directly to the game they take some time before the values are correct

i have two TSubclassOf properties in my subsystem class which i used to be my settings object too, i wanted to set the class there and use them in my logics , and in my subsystem constrcutor i used them to create instances of them but i find them null but when i put a break point down the execution i find that the classes are no longer null , so is that means that the editor settings are loaded after the class constructor ? or how to do it by the book

---

<div class="post-metadata">

**Author:** ![lehuan5062](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lehuan5062](https://forums.unrealengine.com/u/lehuan5062)\
**Post date:** [August 25, 2023, 4:16pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/12 "2023-08-25T16:16:53Z")

</div>

You only need UDeveloperSettings, you don’t really need the module stuff.  
SectionName won’t work by the way.

---

<div class="post-metadata">

**Author:** ![NFU\_Dev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NFU\_Dev](https://forums.unrealengine.com/u/NFU_Dev)\
**Post date:** [August 25, 2023, 4:24pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/13 "2023-08-25T16:24:27Z")

</div>

oh thanks for the fast reply , i will use your way then and see if it helps , i see it a bit more organized than making things in editor module and stuff, sorry for disturbing

---

<div class="post-metadata">

**Author:** ![vvnurmi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vvnurmi](https://forums.unrealengine.com/u/vvnurmi)\
**Post date:** [December 27, 2023, 8:09pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/14 "2023-12-27T20:09:33Z")

</div>

Indeed, setting the SectionName variable doesn’t seem to do anything.

However, the DisplayName meta property does change the config section name. For example like this:

```auto
UCLASS(Config=CurrencySystem, meta=(DisplayName="Currency System"))
class CURRENCYSYSTEMRUNTIME_API UCurrencySetting : public UDeveloperSettings
{ ... }

```

Picked this from Epic’s CollisionProfile.h 🙂  
Cheers!

---

<div class="post-metadata">

**Author:** ![arhiDavid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@arhiDavid](https://forums.unrealengine.com/u/arhiDavid)\
**Post date:** [February 23, 2024, 2:18pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/15 "2024-02-23T14:18:02Z")

</div>

Hello! Can you please clarify, what did you mean by “fixed it by removing the module method above”?  
What have you removed - I’m failing to see any major differences between your code and on the original answer. How did you manage to remove duplicating settings menu entries?

---

<div class="post-metadata">

**Author:** ![Sitiana](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sitiana/32/1194605_2.png) [@Sitiana](https://forums.unrealengine.com/u/Sitiana)\
**Post date:** [February 29, 2024, 2:11pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/16 "2024-02-29T14:11:48Z")

</div>

Don’t do anything that is mentioned as original answer (to add settings in module start up function). All you need to do is create a class derived from UDeveloperSettings and add variables to this class with Config property. Just follow [How to add custom settings in Project Settings? - #10 by lehuan5062](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/10) answer.

By the way if anyone is having LNK error after creating UDeveloperSettings class, you need to add “DeveloperSettings” to Build.cs PrivateDependencyModuleNames section.

---

<div class="post-metadata">

**Author:** ![arhiDavid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@arhiDavid](https://forums.unrealengine.com/u/arhiDavid)\
**Post date:** [February 29, 2024, 4:07pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/17 "2024-02-29T16:07:34Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![GlowlineStd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glowlinestd/32/924978_2.png) [@GlowlineStd](https://forums.unrealengine.com/u/GlowlineStd)\
**Post date:** [April 4, 2024, 2:31pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/18 "2024-04-04T14:31:39Z")

</div>

Hello!  
I have done everything @DevinSherry said at the beginning of the post but nothing is showing up in the Plugin Editor. Can you help me? I don’t know what I’m doing wrong, I’m new to C++.

 ![Screenshot_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/d/d7d9b3b7ffb60e073c358cb7aa36e8f66e49f917.png)

---

<div class="post-metadata">

**Author:** ![Sitiana](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sitiana/32/1194605_2.png) [@Sitiana](https://forums.unrealengine.com/u/Sitiana)\
**Post date:** [April 4, 2024, 8:21pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/19 "2024-04-04T20:21:31Z")

</div>

Hi, don’t follow beginning of the post, read my answer from Feb 29 (2 replies above your question). In short, just create class derived from UDeveloperSettings.

---

<div class="post-metadata">

**Author:** ![Freedomist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Freedomist](https://forums.unrealengine.com/u/Freedomist)\
**Post date:** [July 12, 2024, 11:36am UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/20 "2024-07-12T11:36:30Z")

</div>

So,How Can I use Variable in Blueprint?

---

<div class="post-metadata">

**Author:** ![lehuan5062](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lehuan5062](https://forums.unrealengine.com/u/lehuan5062)\
**Post date:** [July 12, 2024, 12:31pm UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/21 "2024-07-12T12:31:20Z")

</div>

Create a blueprint callable function that can access the default object of the project settings.

---

<div class="post-metadata">

**Author:** ![Freedomist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Freedomist](https://forums.unrealengine.com/u/Freedomist)\
**Post date:** [July 13, 2024, 1:13am UTC](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330/22 "2024-07-13T01:13:22Z")

</div>

thanks,

[Next page](https://forums.unrealengine.com/t/how-to-add-custom-settings-in-project-settings/146330.md?page=2)
