# BUG? USubsystem inheriting from FTickableGameObject keeps ticking while paused

**URL:** <https://forums.unrealengine.com/t/bug-usubsystem-inheriting-from-ftickablegameobject-keeps-ticking-while-paused/490703>\
**Category:** C++\
**Tags:** tick, subsystem, unreal-engine, bug-report, CPP, question\
**Created:** [November 7, 2021, 11:24pm UTC](https://forums.unrealengine.com/t/bug-usubsystem-inheriting-from-ftickablegameobject-keeps-ticking-while-paused/490703 "2021-11-07T23:24:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [November 7, 2021, 11:24pm UTC](https://forums.unrealengine.com/t/bug-usubsystem-inheriting-from-ftickablegameobject-keeps-ticking-while-paused/490703/1 "2021-11-07T23:24:40Z")

</div>

I need to use tick on my subsystem, but there seems to be a bug, can anyone confirm if this is true?  
I expect the Tick function not to execute while the game is paused but it does. when printing the return value of UGameplayStatics::IsGamePaused(this) within Tick, It keeps switching between true and false, which is odd already, but I did not expect the Tick function to execute at all when the game is paused. What is going on here in the engine? I confirmed that the game is paused and unpaused correctly.

**Test Subsystem .h :**

```
#pragma once

#include "Tickable.h"

#include "TestSubsystem.generated.h"

UCLASS()
class UTestSubsystem : public UGameInstanceSubsystem, public FTickableGameObject
{
    GENERATED_BODY()

public:
	// Begin USubsystem
	virtual void Initialize(FSubsystemCollectionBase& Collection) override;
	virtual void Deinitialize() override;
	// End USubsystem
	
	// Begin FTickableGameObject
	virtual bool IsTickableWhenPaused() const override;
	virtual TStatId GetStatId() const override;
	virtual void Tick(float DeltaSeconds) override;
	// End FTickableGameObject
};

```

**Test Subsystem .cpp :**

```
#pragma once

#include "TestSubsystem.h"

// Begin USubsystem
void UTestSubsystem::Initialize(FSubsystemCollectionBase &Collection) {
	Super::Initialize(Collection);
}
void UTestSubsystem::Deinitialize() {
	Super::Deinitialize();
}
// End USubsystem

bool UTestSubsystem::IsTickableWhenPaused() const {
	return false;
}

TStatId UTestSubsystem::GetStatId() const {
	return UObject::GetStatID();
}

void UTestSubsystem::Tick(float DeltaSeconds) {
	if (UGameplayStatics::IsGamePaused(this)) {
		if (GEngine) { GEngine->AddOnScreenDebugMessage(-1, 4.0, FColor::Red, "TimeSubsystem: PAUSED"); }
	}
	else {
		if (GEngine) { GEngine->AddOnScreenDebugMessage(-1, 4.0, FColor::Green, "TimeSubsystem: NOT PAUSED"); }
	}
}
```

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [November 7, 2021, 11:36pm UTC](https://forums.unrealengine.com/t/bug-usubsystem-inheriting-from-ftickablegameobject-keeps-ticking-while-paused/490703/2 "2021-11-07T23:36:56Z")

</div>

Every tick this seems to be Valid and then Invalid, then valid again… Makes no sense?

```
UWorld* WorldTest = this->GetWorld();
```
