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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Is there any UE4 equivalent to Unity's "StreamingAssets" folder / "Application.streamingAssetsPath"?

For those who aren't familiar, Unity's "StreamingAssets" has nothing to do with streaming.

Unity's "StreamingAssets" allows files to be placed into a directory in the project called "StreamingAssets". Those files are not imported into the editor. When packaging a build, those files are placed (unpackaged) into the build without being archived/packaged up. You can use Unity's "Application.streamingAssetsPath" to access the file in both in the editor and in the packaged build with the same relative path.

I haven't yet found anything similar to Unity's "StreamingAssets" nor Unity's "Application.streamingAssetsPath".

This is the closest thing to a solution that I've found:

1) Package a game, find the "RunUAT.bat" command in the output log, and copy it.

2) Create a python script that runs the "RunUAT.bat" command and then places the external files into "{build_dir}\WindowsNoEditor\{project_name}\Binaries\Win64\{external_filename}", next to the .exe file. Now FFileHelper can access the external file with a relative path (path is ".\{external_filename}")

3) Package a build using the python script from now on.

This solves most of the problems, but it does not allow me to use a relative path in the editor, since when using FFileHelper in the editor, all filepaths are relative to "{unreal_editor_installation}\Engine\Binaries\Win64".

So, my questions are:

1) Is there any way to automatically include an external (non-imported) file into a UE4 packaged build, and have it not be placed in a pak file?

2) Is there a way to have FFileHelper access this file in both the editor and in a packaged build without knowing the filepath for the Unreal installation nor the filepath for the packaged build?

Product Version: UE 4.20
more ▼

asked Sep 24 '18 at 08:23 PM in Using UE4

avatar image

26 4 5

avatar image preston_sony Oct 04 '18 at 01:57 AM

To answer your second question (#2, filepaths): FPaths::ProjectDir(), when used in the Unreal Editor, will return the directory containing your .uproject file; whereas if FPaths::ProjectDir() is used in a windows built/packaged game, it will return <buildDir>\WindowsNoEditor\<yourProjectName>\ .

avatar image preston_sony Oct 17 '18 at 08:47 PM

From the blueprint side, you can access FPaths::ProjectDir() by using Rama's Victory plugin: https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/4014-39-rama-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required

The Project directory can be access with the BP node "Victory BP Library / Paths / Victory Paths Game Root Directory"

avatar image Steve SybrSyn Oct 18 '18 at 12:13 AM

This sounds like primary data assets and the asset manager. Which can load and unload assets automatically or through scripting, and which you have to tell the asset manager the assets directory and weather or not you want the assets to be cooked and packaged with the build or not.


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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