How to configure ini file value for a Blueprint Config Variable?
I was hoping to get some assistance in setting up my .ini file to accept custom values for a variable marked for config that I have defined in one of my Blueprints.
At present I define a Blueprint Actor with the name "TestActor" and define a String variable called "ActorString" with the Config Variable checkbox marked. Where I am having trouble is that I cannot seem to find any reference to how I should set up my DefaultGame.ini file both in terms of the section and key/value pair. My current attempt is as follows:
This format I have used because in the past I set up working config variables using the C++ based approach following this reference page: https://docs.unrealengine.com/latest/INT/Programming/Basics/ConfigurationFiles/index.html
There does not seem to be an equivalent for the case of Blueprint Config Variables that I can locate so I was hoping to see if someone could give me some assistance in how I should format my ini file so that the string is set to the TestValue.
Thanks in advance for anyone who can provide me assistance.
Hey, I had the same problem and found the solution!
Hover the "config variable" checkbox with your mouse. There you should see the info, which ini file you have to editit and the name of the section.
In your case I guess your ini-section shoul be:
if your Blueprint is directly in the content folder. If not, you have to add the folder path between "Game" and the Actor Class
The values are loaded once you load the Project in the Editor, not when you hit the PlayButton! Therefore you have to reload your Project in order to see it working!
For some reason this only works if the Actor is inherited from Actor. When it was inherited from player controller for example, it didn't work.
Furthermore I was not able to override the values in a packaged build.
In the BeginPlay of the Pawn you can use this logic
Here I spawned ConfigActor (class ConfigActor - simple Actor with config variables), and then write variables from it to Pawn variables or you can just use it in the Pawn logic
answered May 30 '17 at 02:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here