# How to get a asset content data?

**URL:** <https://forums.unrealengine.com/t/how-to-get-a-asset-content-data/507709>\
**Category:** UDK Content Creation and Design\
**Tags:** unreal-engine\
**Created:** [March 17, 2022, 4:49pm UTC](https://forums.unrealengine.com/t/how-to-get-a-asset-content-data/507709 "2022-03-17T16:49:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shao](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shao](https://forums.unrealengine.com/u/shao)\
**Post date:** [March 17, 2022, 4:49pm UTC](https://forums.unrealengine.com/t/how-to-get-a-asset-content-data/507709/1 "2022-03-17T16:49:15Z")

</div>

I create a new asset type which is json string, and add new type asset to project. I try to get the asset json string but failed. How to do it? The below is:  
UCLASS()  
class RICHTAPTOOLS\_API URichtapClip : public UObject  
{  
GENERATED\_BODY()

private:  
/\*\* clip data source, string info\*/  
/\*\* clip duration, unit ms\*/  
int Duration;

```
UPROPERTY();
FString ClipData;

```

private:  
URichtapClip();  
~URichtapClip();

public:

```
FString FileName;
/** get richtap clip data duration*/
int GetDuration();
//void SetDuration(int Ms);

/** get richtap clip data*/
FString& GetData();
//void SetData(FString& Data);

/** load richtap clip data string*/
bool LoadData();

```

};

UCLASS()  
class URichtapClipFactory : public UFactory  
{  
GENERATED\_BODY()

public:

```
URichtapClipFactory();
virtual UObject* FactoryCreateFile(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, const FString& Filename, const TCHAR* Parms, FFeedbackContext* Warn, bool& bOutOperationCanceled);

//virtual UObject* FactoryCreateNew(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn);

```

};

URichtapClip\* Clip = LoadObject(nullptr, TEXT("/Game/haptic/me\_1.me\_1"));

The me\_1.ue is my asset file of json string located in /content/haptic/me\_1.ue. How can I read the json string data? If I use FFileHelper::LoadFileToString(ClipData, \*FileName), it’s ok, but only for PIE. After packgae, it’s not work.  
Thanks.
