Skip to main content

Runtime Monitor

The Game Event Monitor is a powerful real-time debugging and analysis tool that provides comprehensive insights into your event system's behavior during runtime. It helps you identify performance bottlenecks, track event flows, monitor listener relationships, and debug complex event chains.


๐ŸŽฏ Why Use the Runtime Monitor?โ€‹

Powerful Capabilitiesโ€‹

The Runtime Monitor transforms the way you develop and debug event-driven games:

  • ๐Ÿ” Real-Time Visibility - See exactly when and how events are triggered as they happen
  • โšก Performance Profiling - Identify slow listeners and optimize execution times
  • ๐Ÿ“Š Statistical Analysis - Track event frequency, patterns, and usage trends
  • ๐Ÿ”— Flow Visualization - Understand complex trigger and chain relationships at a glance
  • โš ๏ธ Automatic Warnings - Catch performance issues and potential problems early
  • ๐Ÿ‘‚ Listener Inspector - Monitor all active subscriptions and their sources
  • ๐Ÿ“ Event Logs - Complete execution history with stack traces for debugging

What This Means for Your Developmentโ€‹

Development Benefits
  • Faster Debugging: Instantly see which events fired and in what order
  • Performance Optimization: Identify and fix slow listeners before they impact gameplay
  • Architecture Understanding: Visualize event flows to maintain clean system design
  • Proactive Problem Detection: Catch issues like memory leaks and recursive calls automatically
  • Team Collaboration: Share visual representations of event flows with team members

๐Ÿš€ Opening the Monitorโ€‹

Access from Game Event System Windowโ€‹

The Runtime Monitor is accessed through the main Game Event System window:

  1. Open the Game Event System window: Tools > TinyGiants > Game Event System
  2. Click the "Game Event Monitor" button in the Editor & Monitor toolbar
  3. The Game Event Monitor window will open
Window Management

The monitor window can be docked alongside your other Unity editor windows for convenient access during play mode. We recommend docking it near your Console or Inspector windows.


๐Ÿ“ฑ Interface Overviewโ€‹

Initial Window Stateโ€‹

When you first open the Game Event Monitor, you'll see the window in its stopped state (not in Play Mode):

Monitor Window - Stopped State

Key Elements in Stopped State:

  • Header Bar - Displays the Game Event System logo and window title
  • Status Indicator - Shows "โ—‹ Stopped" in gray (not in Play Mode)
  • Debugger Toggle - Button to enable/disable event tracking
  • Tab Navigation - 8 main tabs (grayed out until Play Mode)
  • Play Mode Prompt - Central message guiding you to enter Play Mode
Requires Play Mode

The Runtime Monitor only collects and displays data during Play Mode. All monitoring features are disabled in Edit Mode to avoid performance overhead.


Window Componentsโ€‹

The monitor interface consists of several key areas:

1. Header Barโ€‹

Located at the top of the window, the header contains:

  • ๐ŸŽฎ Logo & Title - Visual branding and window identification

  • Status Badge

    - Shows current state:

    • Running (green) - Play Mode is active, monitoring events
    • Stopped (gray) - Edit Mode, no monitoring
  • Debugger Toggle

    - Controls whether events are being tracked:

    • Debugger ON (green) - Actively recording events
    • Debugger OFF (red) - Not recording (saves performance)

2. Navigation Toolbarโ€‹

Below the header, you'll find the main navigation tabs:

TabIconPurpose
Dashboard๐Ÿ“ŠOverview of all monitoring data
PerformanceโšกExecution time analysis and profiling
Recent๐Ÿ“Chronological event log
Statistics๐Ÿ“ˆEvent frequency and usage patterns
Warningsโš Performance issues and problems
Listeners๐Ÿ‘‚Active subscriptions overview
Automation๐Ÿ”—Trigger and chain flow visualization
Details๐Ÿ”Deep dive into selected events

3. Search & Controlsโ€‹

On the right side of the toolbar:

  • Search Field - Filter events across all tabs
  • Clear Menu - Options to clear different data types

๐Ÿ“Š Dashboard Tabโ€‹

The Dashboard provides a high-level overview of your entire event system's health and activity.

Dashboard Tab - Running State

Metric Cardsโ€‹

At the top, four metric cards display key statistics:

๐Ÿ“Š Total Eventsโ€‹

  • What it shows: Number of unique events in your game
  • Includes: All events across all active databases
  • Use case: Understand the scale of your event system

๐Ÿ“ Total Logsโ€‹

  • What it shows: Number of event executions recorded
  • Updates: In real-time as events fire
  • Use case: Track overall system activity

โšก Monitoredโ€‹

  • What it shows: Number of events with performance data
  • Criteria: Only events that have been triggered
  • Use case: See which events have profiling info

โš  Warningsโ€‹

  • What it shows: Count of active performance warnings
  • Color: Red if any warnings exist
  • Use case: Quick problem detection

Active Databases Sectionโ€‹

Displays all currently loaded Game Event Databases:

๐Ÿ“ Active Databases (2)
โ”œโ”€ CoreEvents [42 Events] [PRIMARY]
โ””โ”€ UIEvents [18 Events]

Information Displayed:

  • Database name and asset reference
  • Total event count per database
  • PRIMARY badge for the main database
  • Click database name to select it in Project window

Performance Overviewโ€‹

Visual representation of event execution health:

Performance Levels:

  • โœ“ Good (Green) - Execution time < 1ms
  • โš  Warning (Yellow) - Execution time 1-10ms
  • โŒ Critical (Red) - Execution time > 10ms

Visual Breakdown:

  • Color-coded bar showing distribution
  • Percentage of events in each category
  • Average execution time across all events
  • Click "View All โ†’" to jump to Performance tab
Performance Target

Aim for keeping 90%+ of your events in the "Good" category for smooth gameplay. Events in "Critical" should be optimized immediately.

Recent Activityโ€‹

Shows the last 15 events that fired:

Each Entry Displays:

  • [Timestamp] - When the event was raised (HH:MM:SS.mmm)
  • Event Name - The event that was triggered
  • Event Type - Generic type (e.g., GameEvent<int>)

Quick Actions:

  • Click any entry to view full details
  • Entries update in real-time during Play Mode
  • Click "View All โ†’" to see complete history

Quick Warningsโ€‹

If any warnings are active, they appear at the bottom:

Warning Types:

  • ๐Ÿ”ฅ Performance - Events executing too slowly
  • โš ๏ธ High Frequency - Events firing too often
  • ๐Ÿ’พ Memory - Potential memory issues
  • ๐Ÿ”„ Recursive - Possible infinite loops

For Each Warning:

  • Severity indicator (color-coded)
  • Clear description of the issue
  • Number of affected events
  • Click "View All โ†’" to see full list

โšก Performance Tabโ€‹

Detailed performance profiling for every event that has been triggered.

Performance Tab - Running State

Sorting Controlsโ€‹

At the top of the tab, you can sort the performance data:

Sort Options:

  • Avg Time โฌ‡๏ธ - Average execution time (default, descending)
  • Max Time - Maximum recorded execution time
  • Exec Count - Number of times executed
  • Listeners - Average number of listeners

Sort Direction:

  • โฌ‡๏ธ Descending (high to low)
  • โฌ†๏ธ Ascending (low to high)
  • Click the same button again to toggle direction

Performance Tableโ€‹

Each row displays comprehensive metrics for a single event:

ColumnDescriptionColor Coding
IconPerformance level indicator๐ŸŸข Good / ๐ŸŸก Warning / ๐Ÿ”ด Critical
Event NameFull name of the eventBlue (clickable)
Avg TimeAverage execution durationGreen < 1ms, Yellow 1-10ms, Red > 10ms
Min TimeFastest execution recordedGray
Max TimeSlowest execution recordedRed if > 10ms
CountTotal number of executionsWhite
ListenersAverage number of listenersWhite
GCGarbage collection allocationsRed if > 0, Gray if 0
๐Ÿ‘‚View listeners buttonOpens Listeners tab

Reading Performance Dataโ€‹

Example Row:

๐ŸŸข PlayerHealthChanged  1.2ms  0.8ms  3.5ms  Count: 156  Listeners: 4  GC: 0  [๐Ÿ‘‚]

Interpretation:

  • โœ… Event is performing well (green icon)
  • Executes in 1.2ms on average (acceptable)
  • Fastest execution was 0.8ms
  • Slowest execution was 3.5ms
  • Has been triggered 156 times
  • Has 4 active listeners
  • No GC allocations (excellent!)
Performance Red Flags
  • Avg Time > 5ms: Should be optimized
  • Max Time > 16ms: Will cause frame drops
  • GC > 0: Creating garbage, refactor to avoid allocations
  • High Listener Count: Consider consolidating listeners

Quick Actionsโ€‹

  • ๐Ÿ‘‚ Button: Jump to Listeners tab for this specific event
  • Click Row: Select event to view in Details tab
  • Search: Filter events by name in real-time

๐Ÿ“ Recent Events Tabโ€‹

Complete chronological log of all event executions.

Recent Events Tab - Running State

Control Optionsโ€‹

At the top of the tab:

Toggle Options:

  • โ˜‘๏ธ Auto Scroll - Automatically scrolls to newest events
  • โ˜ Show Stack Trace - Displays call stack for each event

Status Indicator:

  • "Showing X of Y" - Displays how many events are visible

Actions:

  • ๐Ÿ—‘ Clear Logs - Removes all logged events

Log Entry Formatโ€‹

Each log entry shows:

[14:23:45.123]  F:1250  PlayerTakeDamage  <GameEvent<GameObject, DamageInfo>>  [Details]
๐Ÿ“ Called by: EnemyController.Attack()

Entry Components:

  • [Timestamp] - Precise time of execution (HH:MM:SS.mmm)
  • F:#### - Frame number when event fired
  • Event Name - Name of the triggered event
  • [Type] - Generic type signature
  • [Details] - Button to view full information
  • ๐Ÿ“ Caller Info - Method that raised the event

Stack Trace Viewโ€‹

When Show Stack Trace is enabled, each entry expands to show:

at GameEventSystem.GameEvent.Raise()
at PlayerController.TakeDamage(float amount) in Assets/Scripts/Player.cs:line 45
at EnemyController.Attack() in Assets/Scripts/Enemy.cs:line 89
...

Use Cases:

  • Track down where events are being triggered
  • Debug unexpected event calls
  • Understand execution flow
  • Identify performance bottlenecks in calling code

Search & Filterโ€‹

Use the search box to filter logs by:

  • Event name (e.g., "Player")
  • Event type (e.g., "GameObject")
  • Partial matches work
Debugging Workflow
  1. Enable Auto Scroll to see events as they happen
  2. When you spot an issue, disable auto scroll
  3. Enable Show Stack Trace to see call hierarchy
  4. Click Details to view full event information
  5. Use this data to track down and fix the problem

๐Ÿ“ˆ Statistics Tabโ€‹

Analyze event usage patterns and frequency over time.

Statistics Tab - Running State

Sorting Controlsโ€‹

Sort statistics by different metrics:

Sort Options:

  • Count โฌ‡๏ธ - Total number of triggers (default)
  • Frequency - Triggers per second
  • Last Trigger - Most recently fired events

Statistics Tableโ€‹

Each row displays usage metrics:

ColumnDescriptionInterpretation
Event NameName of the eventBlue, clickable
CountTotal executionsGreen, higher = more used
Freq/secTriggers per secondRed if > 60/sec
Avg IntervalAverage time between triggersIn seconds
Last TriggerTime since last executionRelative time
View LogsSee all logs for this eventOpens Details tab

Understanding Frequency Dataโ€‹

Example Row:

PlayerMoved  Count: 2,450  Freq/sec: 30.2/s  Avg Interval: 0.033s  Last Trigger: 2s ago  [View Logs]

Analysis:

  • Event has fired 2,450 times total
  • Triggering ~30 times per second (every frame at 30 FPS)
  • Average of 0.033 seconds between triggers
  • Last fired 2 seconds ago

Frequency Interpretation:

  • < 1/sec: Rare events (boss spawns, level transitions)
  • 1-10/sec: Regular events (ability cooldowns, pickups)
  • 10-60/sec: High frequency (movement, input polling)
  • > 60/sec: โš ๏ธ Very high, may need optimization
High Frequency

โ€‹ Warning Events firing at > 60/sec appear in red. While this isn't always a problem, it may indicate:

  • Redundant event raises
  • Events in Update() that should be in FixedUpdate()
  • Unnecessary event traffic that could be batched

Use Casesโ€‹

Identify Unused Events:

  • Sort by Count ascending
  • Events with low counts may be dead code

Find Performance Hotspots:

  • Sort by Frequency descending
  • High-frequency events should be highly optimized

Debug Event Timing:

  • Check Avg Interval to understand event patterns
  • Irregular intervals may indicate bugs

Track Recent Activity:

  • Sort by Last Trigger descending
  • See which events are currently active

โš ๏ธ Warnings Tabโ€‹

Automatic detection of performance issues and potential problems.

Warnings Tab - Running State

Warning Categoriesโ€‹

The system automatically detects several types of issues:

๐Ÿ”ฅ Performance Issuesโ€‹

Slow Execution:

โŒ CRITICAL
Slow Event Execution
Events are taking too long to execute (> 10ms average)
Affected Events (3): PlayerUpdate, EnemyAI, PhysicsSync

Detection Criteria:

  • Average execution time > 10ms
  • Maximum execution time > 16ms (one frame at 60 FPS)

Impact: Can cause frame drops and stuttering

Solution: Optimize listener code, move heavy work to coroutines

โšก High Frequency Warningsโ€‹

Excessive Triggering:

โš ๏ธ WARNING  
High Frequency Events
Events are firing more than 60 times per second
Affected Events (2): OnMouseMove, OnColliderCheck

Detection Criteria:

  • Triggers per second > 60

Impact: CPU overhead, potential unnecessary work

Solution: Batch updates, use throttling, consider alternative patterns

๐Ÿ’พ Memory Warningsโ€‹

GC Allocations:

โš ๏ธ WARNING
Garbage Collection Detected
Events are causing GC allocations during execution
Affected Events (5): SpawnParticle, CreateUI, LoadAsset

Detection Criteria:

  • GC allocations > 0 per execution

Impact: Garbage collection pauses, frame drops

Solution: Use object pooling, avoid creating new objects in hot paths

๐Ÿ”„ Recursive Call Detectionโ€‹

Potential Infinite Loops:

โŒ CRITICAL
Possible Recursive Event
Event may be triggering itself, creating a loop
Affected Events (1): OnValueChanged

Detection Criteria:

  • Event raised from within its own listener
  • Stack trace shows recursion

Impact: Stack overflow, Unity freeze

Solution: Add recursion guards, redesign event flow

Warning Card Layoutโ€‹

Each warning displays:

Header:

  • Icon (๐Ÿ”ฅ/โš ๏ธ/โ„น๏ธ) indicating severity
  • Warning type (e.g., "Slow Execution")
  • Severity badge (CRITICAL / WARNING / INFO)

Body:

  • Clear description of the problem
  • Impact explanation
  • Affected event count

Event List:

  • Shows up to 5 affected events
  • Each with [View] button to inspect
  • "...and X more" if > 5 events affected

Severity Levelsโ€‹

LevelColorPriorityAction Required
CRITICAL๐Ÿ”ด RedImmediateFix before shipping
WARNING๐ŸŸก YellowImportantShould be optimized
INFO๐Ÿ”ต BlueOptionalInformational only

No Warnings Stateโ€‹

When everything is working well:

โœ“ All Good!
No performance issues or warnings detected.
Best Practice

Check the Warnings tab regularly during development. Addressing warnings early prevents performance problems from accumulating and becoming harder to fix later.

๐Ÿ‘‚ Listeners Tabโ€‹

Comprehensive overview of all active event subscriptions.

Listeners Tab - Running State

Listener Cardsโ€‹

Each event with active listeners is displayed as an expandable card:

Card Header:

EventName  โญ (if persistent)     Total: 12
  • Event Name: Name of the event (blue, bold)
  • โญ Icon: Appears for persistent events (survives scene loads)
  • Total Count: Sum of all listener types (green)

Listener Type Breakdownโ€‹

Each card shows 6 blocks representing different listener types:

Visual Layoutโ€‹

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Basic(Insp) โ”‚ Basic(API) โ”‚Priority(API)โ”‚ Cond(API) โ”‚Persist(Insp)โ”‚Persist(API) โ”‚
โ”‚ 3 โ”‚ 2 โ”‚ 4 โ”‚ 1 โ”‚ 0 โ”‚ 2 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Block Typesโ€‹

BlockDescriptionSource
Basic (Insp)Basic listeners from Inspector๐Ÿ”ต Blue (Inspector)
Basic (API)Basic listeners from codeโšซ Dark (API)
Priority (API)Priority listeners from codeโšซ Dark (API)
Cond (API)Conditional listeners from codeโšซ Dark (API)
Persist (Insp)Persistent from Inspector๐Ÿ”ต Blue (Inspector)
Persist (API)Persistent from codeโšซ Dark (API)

Color Codingโ€‹

  • ๐Ÿ”ต Blue Blocks: Configured in Unity Inspector (GameEventManager)
  • โšซ Dark Blocks: Registered via code (AddListener, AddPriorityListener, etc.)
  • Faded/Gray: No listeners of this type (count = 0)
  • White Numbers: Active listeners present

Understanding the Dataโ€‹

Example Card:

PlayerHealthChanged     Total: 8

Basic(Insp): 2 Basic(API): 1 Priority(API): 3 Cond(API): 1 Persist(Insp): 0 Persist(API): 1

Interpretation:

  • 8 total listeners subscribed to this event
  • 2 basic listeners configured in GameEventManager
  • 1 basic listener added via code
  • 3 priority listeners (code-based, with custom priorities)
  • 1 conditional listener (code-based, executes conditionally)
  • 1 persistent listener (code-based, survives scene changes)

Special Indicatorsโ€‹

Persistent Event Card:

  • Has a โญ star icon next to the name
  • Tooltip: "Persistent Event"
  • Basic (Insp) count shows as 0
  • Persist (Insp) shows the Inspector listener count instead

Selected Event:

  • Card has blue highlight background
  • Indicates this event is selected for detailed viewing

Use Casesโ€‹

Debugging Subscription Issues:

  • Verify listeners are properly registered
  • Check if listeners are being removed correctly
  • Identify memory leaks from forgotten subscriptions

Architecture Analysis:

  • See the balance between Inspector and code-based listeners
  • Identify heavily-subscribed events that may need optimization
  • Understand listener distribution across your system

Performance Planning:

  • High listener counts mean more CPU time per event
  • Consider consolidating multiple listeners into one
  • Evaluate if all listeners are necessary
Memory Leak Detection

If you see listener counts growing over time (especially during scene transitions), you may have a memory leak. Objects should properly unsubscribe in OnDisable() or OnDestroy().


๐Ÿ”— Automation Tabโ€‹

Visual representation of trigger and chain event flows.

View Modesโ€‹

Toggle Options:

  • โ˜‘๏ธ Tree View - Shows only root events with full hierarchy
  • โ˜ Flat View - Shows all events with automation, no hierarchy

Automation Tab - Full Tree

Displays automation flows starting from root events (events that are not triggered by other events):

Tree Structure

โ–ถ RootEvent                                      ๐ŸŽฏ Source
โ””โ”€ ๐Ÿ•น๏ธ ChildTrigger1
โ””โ”€ ๐Ÿ•น๏ธ ChildTrigger2
โ””โ”€ ๐Ÿ”— ChainNode1 โฑ 2s Wait
โ””โ”€ ๐Ÿ”— ChainNode2 โณ 1s Wait
โ””โ”€ ๐Ÿ”— ChainNode3

Flat Viewโ€‹

Automation Tab - Flat Tree

Displays automation flows as a chronological list, flattening the hierarchy to show events linked linearly.

Flat Structure

โ–ถ RootEvent                                      ๐ŸŽฏ Source
โ””โ”€ ๐Ÿ•น๏ธ ChildTrigger1

โ–ถ RootEvent ๐ŸŽฏ Source
โ””โ”€ ๐Ÿ•น๏ธ ChildTrigger2

โ–ถ RootEvent ๐ŸŽฏ Source
โ””โ”€ ๐Ÿ”— ChainNode1 โฑ 2s Wait

โ–ถ ๐Ÿ”— ChainNode1 ๐ŸŽฏ Source
โ””โ”€ ๐Ÿ”— ChainNode2 โณ 1s Wait

โ–ถ ๐Ÿ”— ChainNode2 ๐ŸŽฏ Source
โ””โ”€ ๐Ÿ”— ChainNode3

Understanding the Visualizationโ€‹

Node Typesโ€‹

IconTypeDescriptionColor
โ–ถRootSource event (not triggered by others)๐Ÿ”ต Cyan
๐Ÿ•น๏ธTriggerParallel fan-out node๐ŸŸข Green
๐Ÿ”—ChainSequential blocking node๐ŸŸ  Orange

Node Informationโ€‹

Each node displays:

Left Side:

  • Tree connector line (โ””โ”€)
  • Type icon (โ–ถ/๐Ÿ•น๏ธ/๐Ÿ”—)
  • Event name (colored by type)
  • Event GUID (faded, for debugging)

Right Side Status Icons:

  • ๐ŸŽฏ Source - This is a root event
  • ๐Ÿงฉ - Has a condition function
  • โฑ Xs Wait - Has a delay before execution
  • โณ Xs Wait - Has a duration after execution
  • โฉ - Waits for async completion

Reading Flow Patternsโ€‹

Simple Fan-Out (Triggers)โ€‹

โ–ถ ButtonClicked
โ””โ”€ ๐Ÿ•น๏ธ PlaySound
โ””โ”€ ๐Ÿ•น๏ธ ShowFeedback
โ””โ”€ ๐Ÿ•น๏ธ LogAnalytics

Pattern: Parallel execution Behavior: All three events fire simultaneously when button clicks Use Case: Independent side effects

Sequential Chainโ€‹

โ–ถ StartCutscene
โ””โ”€ ๐Ÿ”— FadeOut โฑ 0s Wait โณ 1s Wait
โ””โ”€ ๐Ÿ”— LoadScene โฑ 0s Wait โณ 2s Wait
โ””โ”€ ๐Ÿ”— FadeIn โฑ 0.5s Wait

Pattern: Sequential with delays Behavior:

  1. FadeOut executes, waits 1 second
  2. LoadScene executes, waits 2 seconds
  3. After 0.5 second delay, FadeIn executes

Use Case: Cutscenes, tutorials, loading sequences

Complex Hybridโ€‹

โ–ถ EnemyDefeated
โ””โ”€ ๐Ÿ•น๏ธ StopMusic
โ””โ”€ ๐Ÿ•น๏ธ PlayVictorySound
โ””โ”€ ๐Ÿ”— ShowRewards โฑ 1s Wait
โ””โ”€ ๐Ÿ”— SaveGame
โ””โ”€ ๐Ÿ•น๏ธ SpawnLoot ๐Ÿงฉ

Pattern: Mix of parallel and sequential Behavior:

  • Music/sound effects fire immediately (parallel)
  • Rewards shown after 1 second, then saves game (sequential)
  • Loot spawns conditionally (parallel with condition)

Event Flow Analysisโ€‹

Example Real-World Flow:

โ–ถ OnPlayerDeath
โ””โ”€ ๐Ÿ•น๏ธ StopPlayerInput
โ””โ”€ ๐Ÿ•น๏ธ DisablePlayerCollider
โ””โ”€ ๐Ÿ”— PlayDeathAnimation โณ 2s Wait
โ””โ”€ ๐Ÿ”— ShowDeathUI โฑ 0.5s Wait โณ 3s Wait
โ””โ”€ ๐Ÿ”— RespawnPlayer ๐Ÿงฉ
โ””โ”€ ๐Ÿ•น๏ธ ResetPlayerState
โ””โ”€ ๐Ÿ•น๏ธ UpdateCheckpoint

Flow Breakdown:

  1. Immediate Actions (Triggers):
    • Stop player input
    • Disable collision
  2. Death Animation (Chain):
    • Play animation
    • Wait 2 seconds for animation to complete
  3. Show UI (Chain):
    • Wait 0.5 seconds (transition delay)
    • Show death screen
    • Wait 3 seconds (player can see screen)
  4. Conditional Respawn (Chain with condition ๐Ÿงฉ):
    • Only if player has lives remaining
    • Respawn player at checkpoint
  5. Cleanup (Triggers):
    • Reset player stats
    • Save new checkpoint

Status Icon Referenceโ€‹

IconMeaningDetails
๐ŸŽฏ SourceRoot eventNot triggered by any other event
๐ŸงฉConditionalHas a condition check (may not execute)
โฑ XsStart DelayWaits X seconds before executing
โณ XsDuration WaitWaits X seconds after executing (blocks chain)
โฉAsync WaitWaits for coroutine/async completion

Recursive Detectionโ€‹

If an event triggers itself (directly or indirectly), the tree stops at the recursive node to prevent infinite display:

โ–ถ OnValueChanged
โ””โ”€ ๐Ÿ”— UpdateValue
โ””โ”€ ๐Ÿ”— OnValueChanged โš ๏ธ (Recursive - stopped)
Recursion Warning

Recursive event flows appear in the Warnings tab as potential infinite loops. Always use guards in your code to prevent actual recursion.


๐Ÿ” Details Tabโ€‹

Deep dive into individual event information and execution history.

Details Tab - Log View

The Details tab opens automatically when you:

  • Click [Details] button from Recent Events
  • Click [View Logs] button from Statistics
  • Click [View] button from Warnings

At the top:

  • โ† Back to [Previous Tab] - Return to where you came from

Log Details Viewโ€‹

When viewing a specific log entry:

Event Information Card:

FieldDescription
Event NameFull name of the event
Event TypeGeneric type (e.g., GameEvent<float>)
TimePrecise timestamp (HH:MM:SS.mmm)
FrameFrame number when executed
ArgumentsArgument values passed
Called ByMethod that raised the event

Stack Trace Section:

Stack Trace:
at TinyGiants.GameEventSystem.Runtime.GameEvent`1.Raise(T argument)
at PlayerController.TakeDamage(Int32 damage) in Assets/Scripts/PlayerController.cs:line 142
at EnemyController.Attack() in Assets/Scripts/EnemyController.cs:line 89
at EnemyController.Update() in Assets/Scripts/EnemyController.cs:line 52
...

Use Cases:

  • Track down where events originate
  • Debug unexpected event calls
  • Understand call chains
  • Identify performance bottlenecks

Event Statistics Viewโ€‹

Details Tab - Statistics View

When viewing all logs for a specific event:

Header:

Event: PlayerHealthChanged     Total: 245 triggers

Usage Statistics Card:

MetricDescription
Trigger CountTotal executions
FrequencyTriggers per second
Avg IntervalTime between triggers
Last TriggerRelative time since last execution

Performance Metrics Card (if available):

MetricDescriptionColor
Avg TimeAverage execution durationGreen/Yellow/Red
Max TimeSlowest executionWhite
Min TimeFastest executionGray
GC AllocGarbage collectionsRed if > 0

Recent Logs:

Shows the last 50 executions of this event in reverse chronological order:

[14:52:33.145]  F:3201  PlayerHealthChanged  <GameEvent<float>>  [Details]
๐Ÿ“ Called by: DamageSystem.ApplyDamage()

[14:52:31.089] F:3180 PlayerHealthChanged <GameEvent<float>> [Details]
๐Ÿ“ Called by: HealthRegen.Tick()

...

Use Casesโ€‹

Debugging Event Issues:

  1. Go to Recent Events tab
  2. Find problematic event execution
  3. Click [Details] to see stack trace
  4. Identify calling code
  5. Fix the issue

Performance Analysis:

  1. Go to Statistics tab
  2. Click [View Logs] on slow event
  3. Review performance metrics
  4. Check execution patterns
  5. Optimize based on data

Event Flow Understanding:

  1. Trigger an event chain
  2. View logs for each event
  3. Verify execution order
  4. Check timing between events
  5. Validate behavior

๐Ÿ› ๏ธ Advanced Featuresโ€‹

Debugger Controlโ€‹

Debugger Toggle Button (in header):

  • โ— Debugger ON (green) - Actively recording all event data
  • โ—‹ Debugger OFF (red) - Not recording (saves performance)

When to Disable:

  • During performance-critical gameplay testing
  • When recording gameplay footage
  • To reduce Editor overhead
  • When you don't need monitoring
Performance Impact

The debugger has minimal overhead (~0.1-0.5ms per event), but disabling it during final performance testing gives you the most accurate metrics.

Clear Data Optionsโ€‹

Click the ๐Ÿ—‘ Clear button to access options:

Clear Menu:

  • Clear Logs Only - Removes event execution history
  • Clear Statistics Only - Resets trigger counts and frequency data
  • Clear Performance Data - Resets execution time measurements
  • Clear All Data - Complete reset (requires confirmation