Tools

Overview

The CTools header aggregates all sub-tools into a single include. Including CTools.h gives access to every utility listed below.

Category Sub-Tools Description
Logging CToolLog Logging system with timestamp, caller name, code marker
Validation CToolCheck Null/invalid object check macros
Global CToolGlobal toString overloads, enum conversions, thread checks
Actor CToolActor Actor/camera rotation helpers
AI CToolAI Blackboard key helpers, team attitude checks
Animation CToolAnimation Montage playback with callbacks and stop conditions
Asset CToolAsset Asset loading with multi-plugin path fallback
Async CToolAsync Async tasks, timers, tickables, timelines, condition triggers
Component CToolComponent Runtime creation of objects, actors, components, Niagara, datatables
Introspection CToolIntrospection Read/write UPROPERTY struct fields by name at runtime
Math CToolMath Unix timestamp, circle points, rounding, shuffle, easing
Mobile CToolMobile Platform detection, haptic feedback
Mouse CToolMouse Mouse world intersection and screen position
Navigation CToolNavigation Navigation data retrieval
Perf CToolPerf Per-method performance measurement with macros
Player CToolPlayer Player pawn and controller access
Screen CToolScreen Resolution, AA, VSync, quality settings
Singleton CToolSingleton Typed singleton store/retrieve via UCSingletonManager
Table CToolTable DataTable and DataTableRowHandle helpers
TraceCollision CToolTraceCollision Line trace with multi-channel and debug draw
UIDebug CToolUIDebug Debug drawing (box, arrow, point, text)
Variant CToolVariant Type-safe variant storage (FCdryxVariantSaver)
Widget CToolWidget Widget spawn, remove, text measurement

Higher-level Tools

Tool Description
CPerf Performance data storage UObject, used by CToolPerf
CSettings Project settings exposed in Project Settings > Plugins > Cdryx
CSingletonManager Engine subsystem for named singleton registry and tickable management
CSimpleStateMachine Enum-based state machine with transitions, variant data, auto-forward
CBlackboardData Predefined AI blackboard keys for the behavior tree system

UCPerf

Thread-safe performance measurement storage. Tracks per-method call count, elapsed time and running average. Used by CToolPerf macros.

Name Description
nextperformanceMap Map of method name to FCdryxPerfStruct (start timestamps)
endPerformanceMap Map of method name to FCdryxPerfStruct (end timestamps)
lastPerformanceMapFullDisplay Last time the full perf map was displayed
addInPerfMap Registers a method name in both maps
nextInPerfMap Records a “next” checkpoint: computes elapsed ms, updates average
endInPerfMap Records an “end” checkpoint: computes elapsed ms, updates average
// UCPerf is created automatically by UCGameInstance::Init()
// Use CToolPerf macros instead of calling UCPerf directly:
// CPERF_START("MyMethod")  -> addInPerfMap + nextInPerfMap
// CPERF_NEXT("MyMethod")   -> nextInPerfMap (intermediate checkpoint)
// CPERF_END("MyMethod")    -> endInPerfMap (final measurement)

FCdryxPerfStruct

Name Description
dateTime Last measurement timestamp
timestamp Elapsed milliseconds since last checkpoint
numberOfCall Total number of recorded calls
average Running average of elapsed time in ms

UCSettings

Project settings exposed in Project Settings > Plugins > Cdryx. All properties are Config + EditAnywhere.

Name Description
mimicMobile Simulate mobile platform behavior
timer Enable performance timer display
minTimerToDisplay Minimum ms threshold for individual timer display
allTimerToDisplay Interval (ms) for full timer map display
minStatToConsider Minimum ms to include in statistics
splinatordebug Enable splinator debug rendering
rectangulatordebug Enable rectangulator debug rendering
triangulatordebugdelaunay Enable Delaunay triangulation debug
triangulatordebugvoronoi Enable Voronoi diagram debug
triangulatordebugvoronoi2 Enable Voronoi debug with centroids
triangulatordebugpoint Enable point debug rendering
polygoncentroiddebug Enable polygon centroid debug
trianglecenterccdebug Enable triangle circumscribed circle debug
spheredebugfibo Enable Fibonacci sphere debug
spheredebugsphericalplane Enable spherical plane debug
// Configure in DefaultEngine.ini:
// [/Script/CdryxCoreUModule.CSettings]
// timer=True
// minTimerToDisplay=1.0

// Or via command line:
// -ini:Engine:[/Script/CdryxCoreUModule.CSettings]:timer=True

// At runtime, all properties are available in Project Settings > Plugins > Cdryx

UCSingletonManager

UEngineSubsystem providing a named singleton registry and tickable object management. Thread-safe storage and retrieval.

Name Description
singletonMap Map of FName to TWeakObjectPtr<UObject>
tickableArray Array of tickable UObjects
getInstance Static: returns the singleton manager from GEngine
storeSingleton Stores an object under a typed name (thread-safe)
retrieveSingleton Returns a typed singleton by name, with optional warning callback
retrieveSingleton (BlueprintCallable) Blueprint version returning UObject*
registerTickable Adds a UObject to the tickable array
deregisterTickable Removes and marks a UObject as garbage
// Store a singleton (typically done in spawner's storeSpawnerSingleton)
UCSingletonManager::getInstance()->storeSingleton(this, CSingletonName::CNAME_Singleton_WorldSpawner);

// Retrieve a typed singleton (prefer CToolSingleton helpers)
auto* spawner = UCSingletonManager::getInstance()->retrieveSingleton<ACWorldSpawner>(
    CSingletonName::CNAME_Singleton_WorldSpawner, nullptr);

CTypedName / CSingletonName

Type-safe singleton name wrapper and predefined singleton names.

Name Description
CTypedName<T> Template wrapper: FName + compile-time type association
CSingletonName::CNAME_Singleton_Perf UCPerf singleton
CSingletonName::CNAME_Singleton_Coordinator ACCoordinator singleton
CSingletonName::CNAME_Singleton_*Spawner All spawner singletons (Player, Room, Actor, World, Hexa, FOW, Map, Cell)
CSingletonName::CNAME_Singleton_*Manager All manager singletons (Game, Quest, Skill, Resource)
CSingletonName::CNAME_Singleton_*Noise All noise singletons (World, Cluster, ClusterShift, Room, Biome)
// Type-safe singleton retrieval via CToolSingleton helpers
auto* worldSpawner = retrieveSingleton<ACWorldSpawner>(CSingletonName::CNAME_Singleton_WorldSpawner);

UCBlackboardData

Custom UBlackboardData that defines predefined AI blackboard keys on PostLoad. Requires editor restart when keys change.

Name Description
CBlackboardName::ensureNavigation bool key: ensure navigation is active
CBlackboardName::hostileActorKey Object key: current hostile actor target
CBlackboardName::locationKey Vector key: target location
CBlackboardName::waitKey Float key: wait duration
CBlackboardName::turnByTurnKey Bool key: turn-by-turn mode active
CBlackboardName::automationKey Bool key: automation mode active
CBlackboardName::resourceToCollectKey Object key: resource actor to collect
// Created via Content Browser -> Miscellaneous -> Data Asset -> UCBlackboardData
// Keys are auto-defined in PostLoad, no manual setup needed

// Read/write keys via CToolAI helpers:
trySetBlackBoardKey(aiController, CBlackboardName::hostileActorKey, targetActor);
trySetBlackBoardKey(aiController, CBlackboardName::turnByTurnKey, true);

Third-party Libraries

Library Description
delaunay Delaunay triangulation
miniz Compression (zlib-compatible)
noise FastNoise implementation
terceLambda Lambda utilities