# How to Store the Source file Path with Relative Path

**URL:** <https://forums.unrealengine.com/t/how-to-store-the-source-file-path-with-relative-path/382081>\
**Category:** Pipeline & Plugins\
**Tags:** unreal-engine, editor, UE4, question\
**Created:** [January 17, 2017, 3:59am UTC](https://forums.unrealengine.com/t/how-to-store-the-source-file-path-with-relative-path/382081 "2017-01-17T03:59:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Whereiswall](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Whereiswall](https://forums.unrealengine.com/u/Whereiswall)\
**Post date:** [January 17, 2017, 3:59am UTC](https://forums.unrealengine.com/t/how-to-store-the-source-file-path-with-relative-path/382081/1 "2017-01-17T03:59:35Z")

</div>

I wonder Is there a way to Import Assets and Remember the source files with their relative path.I think “Shooter Game” have already done it but i don’t know how to set.

![122350-relativepath.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/9/e2974f3861a83b189978a42b33ac07fdd2263c6d.jpeg)

And this “Source File” Can’t write, and if I browser a new source file or import a new asset, it just give me a absolute path.

![122361-relativepath2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/5/545c76cee9c17e372426a7b77b2d90e528e333aa.jpeg)

I’m managing a unreal project. Aside the unreal project is our art resource folder, they’re like this:

![122349-projectstructure.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/a/41a25d62b7a35c59878e0a25ee3d8de0ebce8970.jpeg)

In the Example “Shooter Game” Project, I know assets’ source file path can be relative path and it’s easy to keep the relationship like reimport between UAsset and Source file. And I also create a faked folder to test it should work.  
It will be friendly to keep art resource be independent with unreal project and reimport any asset through the relative path wherever their parent folder be placed.

En, And I also tried Auto Reimport Setting. it can be auto import by relative path but “Source File” is still absolute path.

---

<div class="post-metadata">

**Author:** ![amcofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amcofi](https://forums.unrealengine.com/u/amcofi)\
**Post date:** [January 17, 2017, 3:16pm UTC](https://forums.unrealengine.com/t/how-to-store-the-source-file-path-with-relative-path/382081/2 "2017-01-17T15:16:42Z")

</div>

Hei, just add `RelativePath` to the list of meta properties, like so:

```
/** Just a demo property */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Demo", meta = (RelativePath))
FDirectoryPath TestPath;

```

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![Whereiswall](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Whereiswall](https://forums.unrealengine.com/u/Whereiswall)\
**Post date:** [January 18, 2017, 3:07am UTC](https://forums.unrealengine.com/t/how-to-store-the-source-file-path-with-relative-path/382081/3 "2017-01-18T03:07:18Z")

</div>

I don’t know how to override Unreal Native Asset Importer using UPROPPERTY. I mean the Asset like a .fbx file which can be imported to Unreal Editor and turn into a UAsset, Not a property reference in my BP or C++ Class. The “Source File” Path of the UAsset’ Import Setting is absolute path.If I can use a property to fix that, where should I modify with "meta = (RelativePath) "?

![122496-source+file.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/7/68751df97ee57cef2c0e16e0fe9175a05c385cc9.png)

The “Source File” Setting In Picture is what I want to modify to Relative Path.

---

<div class="post-metadata">

**Author:** ![FeyDreamers](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FeyDreamers](https://forums.unrealengine.com/u/FeyDreamers)\
**Post date:** [March 13, 2018, 1:55am UTC](https://forums.unrealengine.com/t/how-to-store-the-source-file-path-with-relative-path/382081/4 "2018-03-13T01:55:05Z")

</div>

RelativePath only workds for FDirectoryPath and not for FilePath (which points to single file instead of whole directory). Is there a way to make FilePath relative?
