Compiler Error: Assertion failed: !TickableObjects.Contains(TickableObject)

*Sorry. I am using a DeepL translation, so some parts may be difficult to read.

I encountered a similar error myself, so I did some research by following various lines from line 40 of TickableObject.cpp and found that I could just mimic part of the processing of UTickableWorldSubsystem, which is an EngineAPI.

The following is a concrete means.

  1. Declare the variables written below as private in the header.
    “bool bInitialized = false”.

  2. Declare the function written below in public in the header.
    “virtual ETickableTickType GetTickableTickType() const override”.
    “virtual bool IsAllowedToTick const override final”

  3. add the process written below to the beginning of the Initilize function.
    “check(!bInitialized); bInitialized = true;”

4.Add the process written below to the beginning of the DeInitialize function.
“check(bInitialized); bInitialized = false;”

5.Add the process written below in the GetTickableTickType function.
“return IsTemplate() ? ETickableTickType::Never : FTickableGameObject::GetTickableTickType();”

  1. Add the process written below in the IsAllowedToTick function
    “return !IsTemplate() && bInitialized;”

This should eliminate the error.

1 Like