x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Storing and retrieving a secret API key in a server build?

I have a REST api that requires a secret key to use, how should I got about storing this key in a way that only server builds have access to it, and that allows me to access it from blueprints?

Product Version: UE 4.18
Tags:
more ▼

asked Jul 01 '18 at 09:50 AM in Using UE4

avatar image

syntholpro
3 1

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Use INI files and don't replicate, make sure it runs on server and only server engine ini has it (don't place key in default config)

Use of INI files is very limited in blueprint, but at least you can read variable from it. You can click variable and extend property tab, there should be Config Variable Checkbox, this will make engine grab default value from INI file on object creation. The INI location where this variable will be loaded from is printed out on tooltip when you hover over the config checkbox. The variable name in INI should be the same as in the blueprint, im not 100% the bool variable might require "b" prefix, also don't make variables name with spaces.

Thats all you can do with INIs in blueprint (without any plugins) for more you need to dive in to C++:

https://docs.unrealengine.com/en-US/Programming/Basics/ConfigurationFiles

^^^^ it will work the same as in blueprint but in C++ you can call LoadConfig() and SaveConfig() on object with config varbales to load and save those variable states from/to INI anytime. You can also more directly edit INI files:

https://wiki.unrealengine.com/Config_Files,_Read_%26_Write_to_Config_Files

All GConfig functions:

https://api.unrealengine.com/INT/API/Runtime/Core/Misc/FConfigCacheIni/index.html

more ▼

answered Jul 01 '18 at 09:50 PM

avatar image

Shadowriver
33.9k 916 164 1093

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question