Skip to content

Instantly share code, notes, and snippets.

@papalqi
Last active March 9, 2022 02:16
Show Gist options
  • Save papalqi/9705f569ff21a6ee713072cf0b9cb0ba to your computer and use it in GitHub Desktop.
Save papalqi/9705f569ff21a6ee713072cf0b9cb0ba to your computer and use it in GitHub Desktop.
GetBuildData
const FMeshMapBuildData* GetMeshMapBuildData() const
{
AActor* Owner = GetOwner();
if (Owner)
{
ULevel* OwnerLevel = Owner->GetLevel();
if (OwnerLevel && OwnerLevel->OwningWorld)
{
ULevel* ActiveLightingScenario = OwnerLevel->OwningWorld->GetActiveLightingScenario();
UMapBuildDataRegistry* MapBuildData = NULL;
if (ActiveLightingScenario && ActiveLightingScenario->MapBuildData)
{
MapBuildData = ActiveLightingScenario->MapBuildData;
}
else if (OwnerLevel->MapBuildData)
{
MapBuildData = OwnerLevel->MapBuildData;
}
if (MapBuildData)
{
return MapBuildData->GetMeshBuildData(MapBuildDataId);
}
}
}
return NULL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment