Get dimensions of actor using GetDefaultObject

I have a floor bp which I’m spawning through my code? How do I get the dimensions of the blueprint? I just need the X width of the mesh.
This is my code:

//Header file
TSubclassOf<AActor> FloorActor;

//cpp
static ConstructorHelpers::FObjectFinder FloorBP(TEXT("Blueprint'/Game/infinite/FloorBP'"));
	FloorActor = (UClass*)FloorBP.Object->GeneratedClass;

FVector groundOrigin;
				FVector groundExtends;
				FloorActor.GetDefaultObject()->GetActorBounds(false, groundOrigin, groundExtends);

				UE_LOG(LogTemp, Warning, TEXT("Origin: %f %f"), groundOrigin.X, groundOrigin.Y);
				UE_LOG(LogTemp, Warning, TEXT("Extends: %f %f"), groundExtends.X, groundExtends.Y);

→ It just returns 0.00 all the time, how do I get the, x, y and z length.

Use GetBounds directly from Mesh component you have there, don’t try to get Actors bounds.

How do I get mesh component? Can u show me in code?

if you don’t know the mesh component ref, you can try to find it by using GetComponent on actor. Here’s one example: [C++]Getting Components from BluePrint using C++ - C++ - Epic Developer Community Forums