Skip to content

Instantly share code, notes, and snippets.

@olegknyazev
Created October 28, 2018 11:27
Show Gist options
  • Save olegknyazev/07b4572f767f3279f14c16aee50d564d to your computer and use it in GitHub Desktop.
Save olegknyazev/07b4572f767f3279f14c16aee50d564d to your computer and use it in GitHub Desktop.
About Formatting: Actor::Destroy() from Unreal Engine
void AActor::BeginDestroy()
{
ULevel* OwnerLevel = GetLevel();
UnregisterAllComponents();
if (OwnerLevel && !OwnerLevel->HasAnyInternalFlags(EInternalObjectFlags::Unreachable))
{
OwnerLevel->Actors.RemoveSingleSwap(this, false);
}
Super::BeginDestroy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment