Skip to content

Add DebugVisualizer to GameObjectFinder and Monkey#271

Merged
nowsprinting merged 12 commits intomasterfrom
chore/debugvisualizer
Oct 24, 2025
Merged

Add DebugVisualizer to GameObjectFinder and Monkey#271
nowsprinting merged 12 commits intomasterfrom
chore/debugvisualizer

Conversation

@nowsprinting
Copy link
Copy Markdown
Owner

@nowsprinting nowsprinting commented Oct 24, 2025

Added

GameObjectFinder

Using the Debug Visualizer can help you investigate why a GameObject cannot be found.
DefaultDebugVisualizer shows visual indicators when "not reachable" or "not interactable" occurs.

To use it, simply pass an instance to the GameObjectFinder constructor, like this:

var visualizer = new DefaultDebugVisualizer();
var finder = new GameObjectFinder(visualizer: _visualizer);

Monkey

Using the Debug Visualizer can help you investigate why a GameObject cannot be operated on.
DefaultDebugVisualizer shows visual indicators when "not reachable" or "ignored" occurs.

To use it, simply set an instance to the MonkeyConfig.Visualizer, like this:

var config = new MonkeyConfig()
{
    Visualizer = new DefaultDebugVisualizer(),
};
await Monkey.Run(config);

Screenshots

Not reachable:
not_reachable

Not interactable:
not_interactable

Ignored:
ignored

Copilot AI review requested due to automatic review settings October 24, 2025 08:19
@github-actions github-actions bot added the chore label Oct 24, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds debug visualization capabilities to GameObjectFinder and Monkey to help investigate why GameObjects cannot be found or operated on. The DefaultDebugVisualizer displays visual indicators for three states: "not reachable" (blocked/not hit), "not interactable", and "ignored".

Key changes:

  • New IVisualizer interface and DefaultDebugVisualizer implementation with configurable pictograms
  • Integration of visualizer into GameObjectFinder and Monkey through optional parameters
  • FadeOutBehaviour component for animated indicator lifecycle management

Reviewed Changes

Copilot reviewed 27 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Runtime/Visualizers/*.cs New visualizer interface, implementation, and fade-out behavior for debug indicators
Runtime/GameObjectFinder.cs Added visualizer parameter and filter methods that show indicators when conditions fail
Runtime/Monkey.cs Added visualizer parameter to display indicators for ignored and unreachable objects
Runtime/MonkeyConfig.cs Added Visualizer property for configuration
Resources/** Icon sprite assets and metadata for visual indicators
Tests/Runtime/*Test.cs Test coverage for visualizer functionality
README.md Documentation for using the debug visualizer feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nowsprinting nowsprinting changed the title Add debug visualizer to GameObjectFinder and Monkey Add DebugVisualizer to GameObjectFinder and Monkey Oct 24, 2025
@nowsprinting nowsprinting force-pushed the chore/debugvisualizer branch from c95f04b to 62bc812 Compare October 24, 2025 11:49
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

Code Metrics Report

master (180bd4e) #271 (407cc21) +/-
Coverage 85.0% 85.0% +0.0%
Code to Test Ratio 1:1.3 1:1.3 -0.1
Test Execution Time 9m43s 12m23s +2m40s
Details
  |                     | master (180bd4e) | #271 (407cc21) |  +/-   |
  |---------------------|------------------|----------------|--------|
+ | Coverage            |            85.0% |          85.0% |  +0.0% |
  |   Files             |               67 |             69 |     +2 |
  |   Lines             |             2256 |           2405 |   +149 |
+ |   Covered           |             1919 |           2046 |   +127 |
- | Code to Test Ratio  |            1:1.3 |          1:1.3 |   -0.1 |
  |   Code              |             4161 |           4380 |   +219 |
+ |   Test              |             5723 |           6011 |   +288 |
- | Test Execution Time |            9m43s |         12m23s | +2m40s |

Code coverage of files in pull request scope (98.9% → 94.9%)

Files Coverage +/- Status
Runtime/GameObjectFinder.cs 99.3% +0.0% modified
Runtime/Monkey.cs 98.1% +0.0% modified
Runtime/MonkeyConfig.cs 100.0% 0.0% modified
Runtime/Strategies/DefaultReachableStrategy.cs 100.0% 0.0% modified
Runtime/Visualizers/DefaultDebugVisualizer.cs 80.0% +80.0% added
Runtime/Visualizers/FadeOutBehaviour.cs 100.0% +100.0% added

Reported by octocov

@nowsprinting nowsprinting merged commit f83576a into master Oct 24, 2025
19 of 20 checks passed
@nowsprinting nowsprinting deleted the chore/debugvisualizer branch October 24, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants