I tried that but it doesn’t work as intended
When I store the GetOuter()
in PostInitProperties()
and then use it in DoSomething()
it shows as null value for some reason
void UMyObject::PostInitProperties() {
Super::PostInitProperties();
if (GIsEditor && !GIsPlayInEditorWorld) {
return;
}
Init(GetOuter()); // ActorOwner = Cast<AActor>(GetOuter());
}
void UMyObject::DoSomething() {
ActorOwner // This is null/invalid for some reason
}