Hi everyone. I’m having trouble creating my own TickableWorldSubsystem.
No matter what I do, I keep getting the error: “Tickable subsystem … tried to tick when not initialized! Check for missing Super call.” I’ve included Super::Initialize(Collection), but the error persists.
Option 1:
void UMyTickableWorldSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
Super::Initialize(Collection);
}
void UMyTickableWorldSubsystem::Deinitialize()
{
Super::Deinitialize();
}
ETickableTickType UMyTickableWorldSubsystem::GetTickableTickType() const
{
return ETickableTickType::Always;
}
TStatId UMyTickableWorldSubsystem::GetStatId() const
{
RETURN_QUICK_DECLARE_CYCLE_STAT(UMyTickableWorldSubsystem, STATGROUP_Tickables);
}
void UMyTickableWorldSubsystem::Tick(float DeltaTime)
{
UE_LOG(LogTemp, Log, TEXT(“— Hello!”));
}
In the second approach, I decided to use ETickableTickType::Conditional and return the tick start time in IsTickable if the system has been initialized:
bool UMyTickableWorldSubsystem::IsTickable() const
{
return IsInitialized();
}
ETickableTickType UMyTickableWorldSubsystem::GetTickableTickType() const
{
return ETickableTickType::Conditional;
}
Please help me figure out what’s going on.
UE5.6