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.