Developer Subsystem
- Base:
- UTickableWorldSubsystem
- Type:
- UNDeveloperSubsystem
- Header File:
- NexusCore/Public/Developer/NDeveloperSubsystem.h
A developer-focused subsystem to help monitor specific metrics related to UObject usage.
Snapshots​
Over the course of a game's development, there comes a point where you start to wonder, do I have a leak? While there are many great tools included with the Unreal Engine — we are looking at you Insights! Sometimes you just want to go old-school and printf everything to a log. We have you covered!
While the UNDeveloperSubsystem provides an automatic monitoring solution, you can manually use N.Developer.CacheSnapshot and N.Developer.CompareSnapshot console commands to create your own diffs! Check out the other console commands!
Setting A Baseline​
The automated system requires a baseline point to be effective in its calculations. Mainly because there is going to be a period where you are creating numerous UObjects, and you don't want the system to consider those objects in its calculation. So when you are ready for it to start watching, call the SetBaseline() command.
- Blueprint
- C++
FTimerHandle SetBaselineTimerHandle;
GetWorld()->GetTimerManager().SetTimer(SetBaselineTimerHandle, UNDeveloperSubsystem::Get(GetWorld()), &UNDeveloperSubsystem::SetBaseline,1.0f, false);
Settings​

| Setting | Description | Default |
|---|---|---|
| Use Developer Subsystem | Should the Developer Subsystem be created? It is required for UObject monitoring, and you still must call UNDeveloperSubsystem::SetBaseline()! | false |
| Warning Threshold | The number of UObjects added after setting the baseline when a warning message will be thrown. | 25000 |
| Snapshot Threshold | The number of UObjects added after after setting the baseline when a FNObjectSnapshot will be taken of the currnet UObjects. | 30000 |
| Save Capture? | Should the FNObjectSnapshot captured be outputted to the project's log folder with a prefix of NEXUS_Snapshot_*. | false |
| Compare Threshold | The number of UObjects added after after setting the baseline when another FNObjectSnapshot will be taken, and then compared against the previous. This will then output the detailed summary of the compare to the project's log folder wih the prefix NEXUS_Compare_*. | 40000 |