void APhysicsVolume::EndPlay(const EEndPlayReason::Type EndPlayReason) { UWorld* MyWorld = GetWorld(); if (MyWorld) { MyWorld->RemovePhysicsVolume(this); } Super::EndPlay(EndPlayReason); }
void APhysicsVolume::Destroyed() { UWorld* MyWorld = GetWorld(); if (MyWorld) { MyWorld->RemovePhysicsVolume(this); } Super::Destroyed(); }