FTickableGameObject, PIE and pause

Hello,

I have an Object in a Runtime module that inherits from FTickableGameObject and implements its interface.
The problem is:
In PIE, when the game (simulation) is paused, my Object still ticks. How to prevent it without linking Editor to Runtime?

Additional info:
FTickableGameObject::IsTickableWhenPaused() defaults to false, unchanged never gets called.

Thanks in advance

,You also need to override “GetTickableGameObjectWorld()” function. If this function returns nullptr (which it does by default), then it will tick when paused too.

1 Like

You also need to override “GetTickableGameObjectWorld()” function. If this function returns nullptr (which it does by default), then it will tick when paused too.

3 Likes

This is it, now its working as expected. Tank you very much!

Thanks for this! Your fix worked for me as well. It’s really bizarre because this isn’t mentioned anywhere in any documentation.

You would think that the obvious choice would be to override IsTickableWhenPaused and return false from that method, but that has no effect. Instead it’s this GetTickableGameObjectWorld that needs to be overridden instead. If someone could shed some light on why this is the case that would be great.

In the meantime, I simply override the function and added the following code, and that worked for me (I’m implementing this in a Clock class I’m creating):

UWorld *UClock::GetTickableGameObjectWorld() const
{
    return GetWorld();
}