I recently integrated this DungeonGenerator plugin into my project directly so I can mess around with the code in Visual Studio. I did this so I can attempt extracting the room data. The room data I want are basically the tiles that make up the room, at least the mesh and world vector position of the mesh.
USTRUCT(BlueprintType)
struct FDungeonRoomData
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "DungeonRoomData")
FVector CenterPosition;
/*
* Units in X Direction
* Units in Y Direction
*/
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "DungeonRoomData")
FVector Size;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "DungeonRoomData")
TArray<FVector> TilePositions;
};
I can correctly make and break this FDungeonRoomData via Blueprints with no issues. The issue I have is how am I suppose to retrieve the tile position data and set it to my TilePositions, set the room Size, and the world vector CenterPosition?
I already did some digging into the Dungeon Generator API code and there's a ton of custom structs and functions reasonably so, it's hard to pinpoint where exactly in the TileMatrix code the tile's vectors are set, because it looks like the Tile has x, y int 32 properties referring to the column and row we set in the blueprints.