Why is FTickableGameObject::Tick() being called in the editor?
Hi, I'm implementing the FTickableGameObject in one of my manager classes.
The base FTickableGameObject class defines the function:
It returns false for being tickable in the editor but my tick function is still being called. Am I doing something wrong? How do I turn of the tick in the editor?
I also never create an instance of my class, I guess this done by the editor to give it some functionality. If someone could shed a little light on this that would be great.
So, some investigation found the answer to this pretty quickly, but it seems like a bug to me. Probably "legacy" behaviour.
Overriding IsTickableInEditor() to return false will not work because of this bit of code, I believe:
in LevelTick.cpp. As you can see that OR makes it behave strangely.
The solution I came up with:
If we're in the editor, and NOT playing, don't tick. Otherwise, tick.
answered Aug 06 '14 at 12:02 PM
I am seeing this as well, and even if there is no instantiated version of my TickableObject.
This implies it must be the CDO ticking (Class Default Object, which UE4 makes for each class so it knows default variable settings).
Using this should work to stop the CDO ticking even in 4.16:
but note that I'm seeing IsTickable() called several times a frame on the CDO when I log it - this doesn't feel like everything is good on the engine side.
Follow this question
Once you sign in you will be able to subscribe for any updates here