SkillAgentSearch skills...

Comment

Add comments to the inspector via a Comment attribute or component

Install / Use

/learn @keenanwoodall/Comment
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Comment

Add comments to the inspector via a Comment component, and a Comment tooltip attribute.

Component

Add the Comment component to write comments in the inspector.

image

Attribute

Instead of using [Tooltip] on a field, you can use [Comment] to automatically display the comment above a field as its tooltip

Unity_4khkk3yXne

public class SimpleExampleScript : MonoBehaviour
{
    // This is a tooltip for a single line comment
    [Comment] public float fieldWithComment;
    
    /// <summary>
    /// This is a summary description of the field.
    /// </summary>
    /// <remarks>
    /// It is used to demonstrate how the [Comment] attribute handles documentation comments.
    /// </remarks>
    [Comment] public float fieldWithXMLComment;
}

Attribute Limitations

  • Comment discovery is greedy(?) The [Comment] attribute will always display the first comment block above the field in question, even if there's other fields in between.
// This is a comment
[Comment] public float field1;
[Comment] public float field2;

// ^ both fields will have the same tooltip

Related Skills

View on GitHub
GitHub Stars20
CategoryProduct
Updated1mo ago
Forks2

Languages

C#

Security Score

90/100

Audited on Feb 27, 2026

No findings