At some point in your project, you might need to create a new custom Asset class, for example, an Asset to store conversation data in an RPG. To properly integrate these with Content Browser, you'll need to create a new Asset type.
Creating a new Asset type
How to do it...
- Create a new C++ class based on UObject called MyCustomAsset:
- Open up the script and update the code of the .h file to the following:
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "MyCustomAsset.generated.h"
/**
*
*/
UCLASS()
class CHAPTER_10_API UMyCustomAsset : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category = "Custom Asset")
FString Name;
...