This article is for the 20th day of the Unreal Engine 4 (UE4) Advent Calendar 2018.
The previous day’s article was by 0xUMA: Trying out automated testing in UE4.
Overview There are times when you want to switch behavior patterns after creating a package for Windows from UE4. Initially, I handled this by allowing parameter changes via external text files (like XML or JSON).
However, eventually, the request came to change the logic itself. So, I will write about how I externalized the logic using JavaScript with Unreal.js.
The sample project created for this article is available below.
GitHub: ayumax/UnrealJsSample
Selecting the Approach In UE4, even if you change C++ code from the Editor, you can hot-reload it, allowing immediate (though with a slight delay) confirmation of behavior. However, this cannot be used after packaging.
Therefore, I looked for a plugin for scripting functionality that can run in the UE4 Runtime and found the following three:
Unreal.js GitHub: ncsoft/Unreal.js
...