Blueprint functions not accessible from UObject derived classes

Got the definitive solution and here I share it!

Add this override to your UObject child class header:

virtual UWorld* GetWorld() const override
{
	if (HasAllFlags(RF_ClassDefaultObject))
	{
		// If we are a CDO, we must return nullptr instead of calling Outer->GetWorld() to fool UObject::ImplementsGetWorld.
		return nullptr;
	}
	return GetOuter()->GetWorld();
}
1 Like