StaticMesh Collision Presets / Collision Object type information is not readable from an Object of UStaticMesh?

I can’t access Collision Profile / Collision Preset information, wich I set up in the Static Mesh Editor UI, in C++… Where I can access this information? Even the BodySetup just shows me an Enum with BodyCollisionEnabled or Disabled / A TraceTag with Simple/Complex Collision is used…

Pls tell me where do they hide that information as i got no time to dig throught every c++ class -_-
Much love for all!

You can use the following functions:


Here is an example and having this information added to the log:

// Called when the game starts or when spawned
void AMyActor::BeginPlay()
	const ECollisionChannel Type = StaticMesh->GetCollisionObjectType();
	UE_LOG(LogTemp, Warning, TEXT("Object Type: %s"), *UEnum::GetDisplayValueAsText(Type).ToString());
	const FName ProfileName = StaticMesh->GetCollisionProfileName();
	UE_LOG(LogTemp, Warning, TEXT("Profile Name: %s"), *ProfileName.ToString());

The result is this:


I hope this helps, and good luck :slight_smile:

Well, thanks for the answer but u got me wrong ;(
In your case, you are accessing the UStaticMeshComponent and well yeah, there we got those informations, as I need to set it in exactly that kinda Component!
I can Get and Set Collision Values in the specific UFoliageType_InstancedStaticMesh, but I want to READ from my RAW UStaticMesh.uasset!
Probably I need to create Foliage Assets where that Data get stored but this doesn’t answer my question… where does they store that collision profiles from my StaticMesh.uassets?
LOL true ninja values