How to use array custom class in BP as a variable?

My class

#pragma once
#include "DungeonRoom.h"

class PROCEDURALDUNGEON_API DungeonEdge
{
public:
	DungeonEdge();
	DungeonEdge(DungeonRoom &_r1, DungeonRoom &_r2);
	~DungeonEdge();

	DungeonRoom r1;
	DungeonRoom r2;
	
	float distance;
};

The variable declaration (in another class)

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Procedural Dungeon") // error
TArray<DungeonEdge> edges;

Such a record did not work

TArray<TSubclassOf<DungeonEdge>> edges;

And maybe in the beginning of the class you want to add (also was a mistake)

UCLASS(BlueprintType)
class PROCEDURALDUNGEON_API DungeonEdge
...

Please help.

Thanks.

I solve the problem

Create the class via class wizzard inherited from UObject

   #pragma once
    #include "Object.h"
    #include "DungeonRoom.generated.h"
     
    UCLASS()
    class PROCEDURALDUNGEON_API DungeonEdge : public UObject
    {
      GENERATED_BODY()
      public:
        ...
    };

Append

 UCLASS(BlueprintType)

And create variable

 UPROPERTY()
 TArray<UDungeonEdge*> edges;

Build