Skip to content

Attribute-Based Inspection

Overview

In this tutorial, we'll explore how to use attribute-based inspection in InspectMe to quickly access and examine classes or members within your Unity projects. This powerful feature simplifies your workflow by providing a direct way to inspect elements via the Unity Inspector.

Step-by-Step Guide

  1. Add the [InspectMe] Attribute:

    • Open your script in your preferred IDE.
    • Place the [InspectMe] attribute above a MonoBehaviour class or its members.
using UnityEngine;

[InspectMe]
public class ExampleClass : MonoBehaviour
{
    [InspectMe]
    public int myValue;

    [InspectMe]
    private string MyString {get; set;}
}
  1. Enter Play Mode:

    • Switch to the Unity Editor.
    • Enter play mode to activate the 'Inspect' button in the Unity Inspector.
    • Use the 'Inspect' Button:

    • Locate the 'Inspect' button in the Unity Inspector.

    • Click the 'Inspect' button to display the class or members in the InspectMe tree view.

Conclusion

Using the attribute-based inspection feature in InspectMe, you can streamline your development process by gaining quick and direct access to the elements you need. This efficient workflow enhancement helps you focus on what matters most—building and refining your Unity projects.


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