# How to read uassets outside of packaged game?

**URL:** <https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567>\
**Category:** Modding\
**Tags:** unreal-engine, Modding, packaging-projects, Blueprint, CPP, question\
**Created:** [February 10, 2017, 7:08pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567 "2017-02-10T19:08:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Motanum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Motanum](https://forums.unrealengine.com/u/Motanum)\
**Post date:** [February 10, 2017, 7:08pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/1 "2017-02-10T19:08:10Z")

</div>

Hello,

I have a blueprint function that gets the assets available inside of a folder in my game Game/MusicShoot/Audio/Songs.

```
//Base Code
//https://answers.unrealengine.com/questions/134539/list-all-maps-in-project-or-directory.html
//
TArray<FString> UMusicalRangeBPFunctionLibrary::GetSongNamesInsideFolder(FString SongPath) {
	if (SongPath.IsEmpty())
	{
		TArray<FString> EmptyArray;
		EmptyArray.Add("ERROR");
		EmptyArray.Add("Invalid Path");
		return EmptyArray;
	}
	auto ObjectLibrary = UObjectLibrary::CreateLibrary(UObject::StaticClass(), false, true); //UWorld::StaticClass() UObject::StaticClass()
	ObjectLibrary->LoadAssetDataFromPath(SongPath); //Path input here "/Game/MusicShoot/Audio/Songs" //Had TEXT() here
	TArray<FAssetData> AssetDatas;
	ObjectLibrary->GetAssetDataList(AssetDatas);
	UE_LOG(LogTemp, Warning, TEXT("Found Songs: %d"), AssetDatas.Num()); //Display ItemsFound

	TArray<FString> Names = TArray<FString>();

	for (int32 i = 0; i < AssetDatas.Num(); ++i)
	{
		FAssetData& AssetData = AssetDatas[i];
		FString name = AssetData.AssetName.ToString();
		if (name.Contains("Track-",ESearchCase::CaseSensitive, ESearchDir::FromStart))
		{		
			name.RemoveFromStart("Track-");
			Names.Add(name); 
		}
	}
	return Names;
}

```

The function works perfectly, but I want people to be able to add their own songs to the game, and the game should read and play them. So, after packaging the game, uploading to steam and downloading from steam. I placed another song (uasset file made in ue4, which I removed before packaging) in the steam directory under “common\Game Name\GameName\Content\MusicShoot\Audio\Songs”. But when I launch the game, the new modded song added is not being read by the game.

I tried to enable and disable “Use Pak File”, and it doesn’t do anything. So, how can I have the game Read assets that are not originally packed in?

Related forum post, which may have more info.

> **[Reading uassets outside of packaged game](https://forums.unrealengine.com/showthread.php?136532-Reading-uassets-outside-of-packaged-game)**
>
> Hi. I am making a VR game. We plan to announce early next week. But I will say what it is, because editing the code and folders to hide the game is just too much work, and might interfere with my issue. Game is called musical Range, you are in a...

---

<div class="post-metadata">

**Author:** ![Motanum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Motanum](https://forums.unrealengine.com/u/Motanum)\
**Post date:** [February 13, 2017, 8:04pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/2 "2017-02-13T20:04:21Z")

</div>

Does anyone have an idea on how to achieve this? I am still stuck in this problem.

---

<div class="post-metadata">

**Author:** ![678GUY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@678GUY](https://forums.unrealengine.com/u/678GUY)\
**Post date:** [February 14, 2017, 5:38pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/3 "2017-02-14T17:38:55Z")

</div>

if your programing in c++ you can try reading files from like a folder that is not your game like you the music folder

---

<div class="post-metadata">

**Author:** ![Motanum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Motanum](https://forums.unrealengine.com/u/Motanum)\
**Post date:** [February 15, 2017, 2:52pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/4 "2017-02-15T14:52:31Z")

</div>

It’s easier if it’s all in the same folder, as I just make an array and can just build the name of the asset to load. I am baffled because in the Steam install version, I added the 2 songs.

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/5/0051312633a133b4cc64dcd1c594e8e2b4db7d70.png)

But when the game runs, and prints the list of songs founds, it doesn’t print those 2 extra songs. I am wondering if maybe the path has to be changed as the /game/musicshoot/audio/… doesn’t work on packaged projects?

---

<div class="post-metadata">

**Author:** ![678GUY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@678GUY](https://forums.unrealengine.com/u/678GUY)\
**Post date:** [February 15, 2017, 4:32pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/5 "2017-02-15T16:32:41Z")

</div>

the thing is that tha UE4 dosent look at assets that wasent imported in the editor origanly

---

<div class="post-metadata">

**Author:** ![Motanum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Motanum](https://forums.unrealengine.com/u/Motanum)\
**Post date:** [February 15, 2017, 4:36pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/6 "2017-02-15T16:36:27Z")

</div>

How can I override this though?

---

<div class="post-metadata">

**Author:** ![678GUY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@678GUY](https://forums.unrealengine.com/u/678GUY)\
**Post date:** [February 15, 2017, 7:05pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/7 "2017-02-15T19:05:16Z")

</div>

i dont know i think the best way to do it is use c++ to read it in normal form like mp3 from another directory so players can put their mp3 there it will be more eazy

---

<div class="post-metadata">

**Author:** ![Motanum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Motanum](https://forums.unrealengine.com/u/Motanum)\
**Post date:** [February 15, 2017, 7:23pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/8 "2017-02-15T19:23:02Z")

</div>

The track is actually a midi format.

---

<div class="post-metadata">

**Author:** ![678GUY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@678GUY](https://forums.unrealengine.com/u/678GUY)\
**Post date:** [February 15, 2017, 7:47pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/9 "2017-02-15T19:47:30Z")

</div>

so try to read that if you can and play it

---

<div class="post-metadata">

**Author:** ![Motanum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Motanum](https://forums.unrealengine.com/u/Motanum)\
**Post date:** [March 23, 2017, 3:35pm UTC](https://forums.unrealengine.com/t/how-to-read-uassets-outside-of-packaged-game/384567/10 "2017-03-23T15:35:03Z")

</div>

Still no solution to this problem.
