Create Configs

I have c++ class for character.But every time when i change properies need again compile code. I decided use configs. How write it(example or tutorial pls)?

Why don’t you use property editor to test changes before applying them to the code? make blueprint based of you character class and edit defaults there, you can even keep it that way, nothing bad will happen.

But saving configuration is quite easy first in UCLASS you put config specfier to tell to which ini file you want class to use, without .ini at the end, it can be existing one like Engine or Game for example


and then in UPROPERTY you add “config” too to variables you want to be saved in config

UPROPERTY(config, EditAnywhere)
FString MyString;

Then by simply using LoadConfig() and SaveConfig() function on object of your class to save and load config, also when object of a class is created (actor spawn for example) config is automatically loaded and applied to varables. Remeber that LoadConfig will only set variables, your code should put changes in to action when config is loaded.

There also API for advance ini editing, you can access do functions via GConfig, there also static function to load ini from other locations:

For this you might find FPaths class useful, it has function when you can get directory paths for various things:

Here you got wiki page how to use those APIs, but i recommand oyu to use 1st method as it is more cleaner and stright forward:

Config example pls.