Skip to content

Watchers

The Watchers feature in InspectMe is a dynamic tool designed to enhance your debugging process in Unity. It allows you to monitor changes in real-time for various properties and fields of Unity objects.

Quick Overview

  • Functionality: Watchers observe and alert you to changes in values of Unity objects during runtime.
  • One Watcher per Members: Each inspected member within InspectMe's Tree View can have one Watcher.
  • Notification Options: Customize how you receive alerts (e.g., logs, beep sound, editor pauses, or pop-ups).

Setting Up a Watcher

  1. Attach a Watcher: Select a member from the Tree View and attach a Watcher. To attach a Watcher to a member:
    • Via Context Menu: Right-click on a member in the Tree View and select 'Add Watcher' from the context menu.
    • Via Menu Button: Use the menu button at the top of the Tree View to add a Watcher to the selected member.
    • Scripted Attachment: Directly add a Watcher in your script following an InspectMe() call. Customize settings to suit your project's needs. Learn More
  2. Configure Settings: Choose your preferred notification method and other settings like continuous monitoring or history tracking.
  3. Monitor Changes: Receive notifications based on your configured settings when values change.

Info

For a detailed guide on adding and using Watchers via code, check out the Usage Page for practical examples and tips.

Key Implementation Guideline

Watchers serve as essential debugging tools in the Unity Editor environment. They are not suitable for managing game logic in your production releases. Please ensure to use Watchers appropriately for debugging purposes only.

Supported Types

Watchers in InspectMe can be utilized with various member types, each with specific trigger conditions:

  • Value Types: Inspect basic data types such as int, float, string, etc., for direct value changes.
  • Collections: Monitor all generic collections, including custom classes derived from these. The watcher triggers when there's a change in the collection size.
  • Interfaces: Track members representing interface implementations. The watcher activates upon changes in the assigned reference.
  • Special Types: Includes DateTime, TimeSpan, and Unity-specific value types like Vector3, Color, Curve, etc., catering to a wide range of use cases.

Watcher States

State Description
🔴 Idle The Watcher is set up but not actively monitoring the inspected member.
🟢 Active Actively monitoring the inspected member's value for changes.
🟠 Invoked A change has been detected in the inspected member and reported.

Notifications

Customize how you want to receive notifications when a watched value changes:

Notification Description
Console Logs Outputs messages in the Unity console for observed changes.
Beep Plays a beep sound to alert you of changes.
Pause Editor Automatically pauses the Unity Editor when a change is detected.
Pop-Up Displays a pop-up window with details about the change.

Managing and Customizing

Easily manage your watchers through InspectMe's intuitive interface. Activate, pause, or delete watchers as needed, and customize their settings to suit your workflow.


For any queries or support regarding Watchers feature, please refer to our Support section or visit our FAQ page.