Uobject begin play() equivalent

  • Defenition for FWorldDelegates::OnPostWorldCreation

DECLARE_MULTICAST_DELEGATE_OneParam(FWorldEvent, UWorld* /World/);

FWorldDelegates::OnPostWorldCreation.AddUobject(yourObj, &UYourClass::OnPostWorldCreation);

UFUNCTION()
void OnLevelsChangedEvent(UWorld* world);

  • Defenition for FWorldDelegates::OnPostWorldInitialization

DECLARE_MULTICAST_DELEGATE_TwoParams(FWorldInitializationEvent, UWorld* /World/, const UWorld::InitializationValues /IVS/);

FWorldDelegates::OnPostWorldInitialization.AddUobject(yourObj, &UYourClass::OnPostWorldCreation);

UFUNCTION()
void OnLevelsChangedEvent(UWorld* world, const UWorld::InitializationValues);

  • Defenition for LevelsChangedEvent

DECLARE_EVENT(UWorld, FOnLevelsChangedEvent);

GetWorld()->LevelsChangedEvent.AddUobject(yourObj, &UYourClass::OnLevelsChangedEvent);

UFUNCTION()
void OnLevelsChangedEvent();

Here is docs: Delegates | Unreal Engine Documentation

1 Like