Here’s what my header file looks like:
#pragma once
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
USTRUCT(BlueprintType)
struct FMyStruct
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditDefaultsOnly, Category = Test, meta = (AllowedClasses = "AMyActor", ExactClass = false))
FStringAssetReference MyStructAsset;
};
UCLASS()
class MYPROJECT13_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
FMyStruct StructProperty;
};
As you stated, I created a blueprint based on MyActor. When I expand the dropdown for MyStructAsset it still shows available classes.
Can you post the code you’re using along with a screenshot of what your blueprint details look like for comparison?