Defining a user defined structure returned function in a blueprint inteface

Hi,

  • I have implemented a function in a blueprint interface in a uclass and able to return a float value through blueprint.
  • Then I defined a used defined structure which return that type of tarray and able to build the project.
  • Function is like this :
    TArray AShapeFileIntegrator::readShapeFileDataFromShpFile_Implementation()
  • Though the project was build in the output folder I was able to see the log error.
    Cannot expose property to blueprints in a struct that is not a BlueprintType. Vertex2.m_x
    LogCompile: Error: Type ‘TArray’ is not supported by blueprint. ShapeObject2.m_vertex
  • And since the project was build I was going to open the u project and it gives this error. And when I recompiled manually also this prompt is there and unable to open the uproject.

333090-unreal.png

  • What can I do for this. Also I tried on switching the unreal version option also.

You need to add BlueprintType for your struct to be accessible in blueprints

USTRUCT(BlueprintType)
    struct FMyStruct {
    
    GENERATED_BODY()
    
    UPROPERTY(BlueprintReadWrite)
    int MyFoo;
    
    ...
    }