Skip to main content
added 1 character in body
Source Link

I would like to expose some DataAsset in the configuration of my plugin.

If I wanted some integer, this would work well:

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
int Foo;

But If I go for

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
UFoo* Foo;

where

UCLASS()
class UFoo: public UDataAsset

then I get the error message:

error : Not allowed to use 'config' with object variables

Is there anyway to benefit forfrom the nice UI features of UDataAsset, while exposing them in the settings?

I would like to expose some DataAsset in the configuration of my plugin.

If I wanted some integer, this would work well:

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
int Foo;

But If I go for

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
UFoo* Foo;

where

UCLASS()
class UFoo: public UDataAsset

then I get the error message:

error : Not allowed to use 'config' with object variables

Is there anyway to benefit for the nice UI features of UDataAsset, while exposing them in the settings?

I would like to expose some DataAsset in the configuration of my plugin.

If I wanted some integer, this would work well:

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
int Foo;

But If I go for

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
UFoo* Foo;

where

UCLASS()
class UFoo: public UDataAsset

then I get the error message:

error : Not allowed to use 'config' with object variables

Is there anyway to benefit from the nice UI features of UDataAsset, while exposing them in the settings?

Source Link

Exposing Unreal DataAsset in plugin config

I would like to expose some DataAsset in the configuration of my plugin.

If I wanted some integer, this would work well:

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
int Foo;

But If I go for

UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Some asset")
UFoo* Foo;

where

UCLASS()
class UFoo: public UDataAsset

then I get the error message:

error : Not allowed to use 'config' with object variables

Is there anyway to benefit for the nice UI features of UDataAsset, while exposing them in the settings?