虛幻5.1 UUserWidget不再包含OnLevelRemovedFromWorld
轉(zhuǎn)而使用NativeDestruct()
// virtual void OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld);
virtual void NativeDestruct()?override;
/*void UMenu::OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld)
{
? ? MenuTearDown();
????Super::OnLevelRemovedFromWorld(InLevel, InWorld);
}*/
void UMenu::NativeDestruct()
{
????MenuTearDown();
????Super::NativeDestruct();
}
標(biāo)簽: