# Can't read variables from DefaultEngine.ini file. Going crazy!

**URL:** <https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575>\
**Category:** Blueprint\
**Tags:** variables, ini, unreal-engine, config, Blueprint, question\
**Created:** [September 26, 2024, 1:33am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575 "2024-09-26T01:33:58Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [October 16, 2024, 10:43am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/21 "2024-10-16T10:43:24Z")

</div>

Hi @QubaXR

I was referring to deleting them individually. When I’m finishing a product I always you remove the Saved folder and the intermediate folder. They’re not needed for the final product and would be removed upon submission to Unreal Marketplace usually as well. To be safe, when you delete them don’t permanently delete them. They should be inside your recycle bin where you can restore them if needed. (Or just copy and paste them from your project folder to your desktop and put them back if needed)

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [October 26, 2024, 1:50am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/22 "2024-10-26T01:50:48Z")

</div>

Were you able to get it resolved?

---

<div class="post-metadata">

**Author:** ![QubaXR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qubaxr/32/471864_2.png) [@QubaXR](https://forums.unrealengine.com/u/QubaXR)\
**Post date:** [October 27, 2024, 5:04am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/23 "2024-10-27T05:04:10Z")

</div>

No, nothing helped and I feel like I am exploring more and more weird avenues, whereas the problem seems to be more fundamental.

I think I might have run out of time to work on this. May end up just buying a savefile management plugin and use that…

---

<div class="post-metadata">

**Author:** ![Ram07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ram07](https://forums.unrealengine.com/u/Ram07)\
**Post date:** [October 27, 2024, 6:10am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/24 "2024-10-27T06:10:40Z")

</div>

Hey!!  
After some discussion with chatgpt, i am guessing we have to create custom .ini file and retrieve data from that .ini. After packaging, this custom .ini file is untouched and will remain in config folder of build and so if you change values in this, it should work.

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [October 28, 2024, 1:32am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/25 "2024-10-28T01:32:55Z")

</div>

Were you able to test and confirm this? I haven’t attempted this method.

---

<div class="post-metadata">

**Author:** ![QubaXR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qubaxr/32/471864_2.png) [@QubaXR](https://forums.unrealengine.com/u/QubaXR)\
**Post date:** [October 28, 2024, 2:29am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/26 "2024-10-28T02:29:49Z")

</div>

Will have to try. Come to think of it, I did start with custom .ini files - but that was before I learned the variables cannot be on the pawn… I think I first moved the data to EngineDefault.ini and THEN changed from pawn to custom BP.

Should try it!

---

<div class="post-metadata">

**Author:** ![QubaXR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qubaxr/32/471864_2.png) [@QubaXR](https://forums.unrealengine.com/u/QubaXR)\
**Post date:** [October 29, 2024, 2:44am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/27 "2024-10-29T02:44:57Z")

</div>

TL;DR - did not work.

Here’s the story:

1. @Ram07 ChatGPT likes to either hallucinate answers, or make them so generic, they don’t really help. Still I tried making random `ini` files - it would just ignore them, unless I adhered to the naming convention below:
2. I used [Epic’s Configuration File Hierarchy](https://dev.epicgames.com/documentation/en-us/unreal-engine/configuration-files-in-unreal-engine#configurationfilehierarchy) as a reference.
3. I tried nearly every single option on this list:

```auto
Engine/Config/Base.ini
Engine/Config/Base<CATEGORY>.ini
Engine/Config/<PLATFORM>/Base<PLATFORM><CATEGORY>.ini
Engine/Platforms/<PLATFORM>/Config/Base<PLATFORM><CATEGORY>.ini
<PROJECT_DIRECTORY>/Config/Default<CATEGORY>.ini
Engine/Config/<PLATFORM>/<PLATFORM><CATEGORY>.ini
Engine/Platforms/<PLATFORM>/Config/<PLATFORM><CATEGORY>.ini
<PROJECT_DIRECTORY>/Config/<PLATFORM>/<PLATFORM><CATEGORY>.ini
<PROJECT_DIRECTORY>/Platforms/<PLATFORM>/Config/<PLATFORM><CATEGORY>.ini
<LOCAL_APP_DATA>/Unreal Engine/Engine/Config/User<CATEGORY>.ini
<MY_DOCUMENTS>/Unreal Engine/Engine/Config/User<CATEGORY>.ini
<PROJECT_DIRECTORY>/Config/User<CATEGORY>.ini

```

1. I also constructed a quick new project that has nothing else in it but a simple screen widget displaying two variables (marked as “Config Variables”)
2. While **in Editor** , but using the _Standalone Game_ preview button, the project reads any of these ini files **perfectly**. I run the preview, it reads current values. Close preview, change `ini` file, run another preview - new values are in.
3. The moment I **Package the Project** , the values from the ini file (at that time) get **baked** into the project.
4. Packaged project does not have any folders with `ini` files in them (they are inside a PAK) and displays whatever values it read at the moment of packaging.
5. For a while I was hoping that placing the `ini` outside of the project folder (`My Documents\Unreal Engine\Engine\Config\UserEngine.ini`) would help, but the same situation persists. Once packaged, the project becomes _deaf_ to any `ini` files - either ones that existed while packaging, or new ones.
6. @FrostyJas Deleting directories inside the project (both pre-packaging and after-packaging) does not yield any results.

In essence - it looks like the engine reads the `ini` only **at the time of packaging the project**.

There must be some way to fix this - [Unreal Docs](https://dev.epicgames.com/documentation/en-us/unreal-engine/configuration-files-in-unreal-engine), if I am not vastly misunderstanding, claim it is possible.

---

<div class="post-metadata">

**Author:** ![Ram07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ram07](https://forums.unrealengine.com/u/Ram07)\
**Post date:** [October 29, 2024, 3:52am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/28 "2024-10-29T03:52:59Z")

</div>

let me try once for you, so in short, you want to change values in .ini (whether its custom or defaultengine) and they should reflect in package game without packaging again right?

---

<div class="post-metadata">

**Author:** ![QubaXR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qubaxr/32/471864_2.png) [@QubaXR](https://forums.unrealengine.com/u/QubaXR)\
**Post date:** [October 29, 2024, 4:39am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/29 "2024-10-29T04:39:55Z")

</div>

@Ram07 Correct. I am not married to any specific `ini` file, as long as it is a simple text file I can edit to affect already packaged project.

If you want I can quickly zip and share the test project I’ve been working on.

---

<div class="post-metadata">

**Author:** ![Ram07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ram07](https://forums.unrealengine.com/u/Ram07)\
**Post date:** [October 29, 2024, 6:19am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/30 "2024-10-29T06:19:50Z")

</div>

I got this working!!

First, i have created a function like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/3/893895e6849c4170aa96bf4671c540b6df89386e.png)  
Here

1. Get platform user dir gives the location of documents folder in PC and Config.json is our file name
2. so, you can ask them to keep your config.json in their documents folder, like when you share the zip
3. load file to string is the c++ function  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/8/ea857902094f80ce34abbff38d000e82ff263107.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/a/3cae3bf8504fe4667b568cad15ca452ae0140445.png)  
Here are .h and .cpp logic
4. You can select blueprint function library class while creating c++ class
5. Varest plugin is used and those nodes - decode json value, as object are from that plugin
6. and lastly, here is the sample json which i tested on  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/5/cc50fbcf65342d1202397a70afd946fada6c1fdc.png)
7. so as you can see, via code, i can retrieve string field of Test and set to whatever variable i want and btw, i called this load config json function in begin play of third person character and function is also created in TPC

---

<div class="post-metadata">

**Author:** ![QubaXR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qubaxr/32/471864_2.png) [@QubaXR](https://forums.unrealengine.com/u/QubaXR)\
**Post date:** [October 29, 2024, 10:53pm UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/31 "2024-10-29T22:53:47Z")

</div>

This is awesome @Ram07 though I was looking for a solution without the need to learn how to do C++… I am a 100% BP person. I really don’t think I have the bandwidth on my side to now learn how to use VS, create classes etc…

Not that I don’t appreciate your help, but I guess I will just buy a plugin from marketplace. There seem to be a ton of ones to do this. Had my eye on one called [ConfigBP](https://www.fab.com/listings/2f3fa6a5-f13c-4620-afd7-fa1d8ec5893c)

---

<div class="post-metadata">

**Author:** ![Ram07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ram07](https://forums.unrealengine.com/u/Ram07)\
**Post date:** [October 30, 2024, 3:54am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/32 "2024-10-30T03:54:38Z")

</div>

sure

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [November 1, 2024, 5:04am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/33 "2024-11-01T05:04:07Z")

</div>

You were able to get it working, @Ram07?

---

<div class="post-metadata">

**Author:** ![Ram07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ram07](https://forums.unrealengine.com/u/Ram07)\
**Post date:** [November 1, 2024, 5:36am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/34 "2024-11-01T05:36:22Z")

</div>

yes

---

<div class="post-metadata">

**Author:** ![QubaXR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qubaxr/32/471864_2.png) [@QubaXR](https://forums.unrealengine.com/u/QubaXR)\
**Post date:** [November 2, 2024, 2:58am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/35 "2024-11-02T02:58:16Z")

</div>

@FrostyJas Just to be precise, @Ram07 did not find a way to read the `.ini` files in BP, but instead came up with another solution, featuring a plugin, C++ code and storing variables in a JSON file.

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [November 2, 2024, 7:24am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/37 "2024-11-02T07:24:15Z")

</div>

Good deal! I’m glad you got it working.

---

<div class="post-metadata">

**Author:** ![RealAero](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/realaero/32/716140_2.png) [@RealAero](https://forums.unrealengine.com/u/RealAero)\
**Post date:** [April 2, 2025, 5:46am UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/38 "2025-04-02T05:46:31Z")

</div>

I would assume Instance Editable needs to be checked, Variables cannot change from their default value if this isn’t checked in many other scenarios.

---

<div class="post-metadata">

**Author:** ![Tomasz\_Klin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tomasz\_Klin](https://forums.unrealengine.com/u/Tomasz_Klin)\
**Post date:** [September 28, 2026, 8:12pm UTC](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575/39 "2026-09-28T20:12:18Z")

</div>

Hey, I know this one’s old, but it still comes up when you google the problem, so here’s what was actually going on (in case it saves someone else two days):

- **Pawn vs Actor**. BP config variables are read from whatever ini the C++ parent class uses. Actor uses Engine, but Pawn, Character and PlayerController all use **Game**. So for a Pawn like BP\_CanvasCamera the section had to go in DefaultGame.ini, not DefaultEngine.ini. That’s why moving the vars to a plain Actor “fixed” it.

- **The “baked” thing.** A packaged UE5 build doesn’t read the Default\*.ini files at all. When you package, all the config gets baked into Config/BinaryConfig.ini, so editing DefaultEngine.ini afterwards does nothing, pak or no pak.

- **What a packaged build does read on every launch** is the ini in Saved:

- Development build: `\\Saved\Config\Windows\`

- Shipping build: `%LOCALAPPDATA%\\Saved\Config\Windows\`

Drop the same section into Game.ini there (Engine.ini for a plain Actor), create the file if it isn’t there, restart, and you’ll get the new values:

```auto
[/Game/Blueprints/BP_CanvasCamera.BP_CanvasCamera_C]

testNumber=777

testString=changed

```

Heads-up: if the game itself ever writes to that file, the engine only keeps the sections it’s been told to keep, so a hand-added one can just vanish. Keep a copy somewhere.

Small plug, feel free to skip it: I made a plugin for exactly this kind of thing, [Blueprint Project Settings | Fab](https://www.fab.com/listings/2d045c59-af3f-4dbb-85c0-c0fb4d48af89) . You make a settings Blueprint, tick Config Variable, and read the values anywhere with Get Settings. No casting, no C++. Set its Storage to Saved and whoever runs the build just edits a `[BP_GallerySettings]` section in that same Game.ini, and the plugin makes sure the engine doesn’t drop it. It’s UE 5.6+ though, and yeah, I’m biased, so the steps above work fine without it too 🙂

[Previous page](https://forums.unrealengine.com/t/cant-read-variables-from-defaultengine-ini-file-going-crazy/2038575.md?page=1)
