Search Unity

Comments on Components as a Unity Editor Feature

Discussion in 'Editor & General Support' started by UnityButters, Jun 30, 2020.

  1. UnityButters

    UnityButters

    Joined:
    Sep 4, 2019
    Posts:
    2
    Hi,

    It would be great to have the ability as part of the Unity Editor to be able to add comments to any component. The main reason I can see for this is providing information about the usage of the component or marking it with a tag to identify it as part of a system.

    Cheers,
    Rob.
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    This comes up from time to time. In case you don't feel like waiting, one possible simple solution is just to create a component for putting documentation onto. I use this to add "notes" to objects. It's a separate component, so you can't add notes directly to a component, but I find that putting this at the top of my objects, when needed, draws enough attention to it:

    Code (CSharp):
    1. /// <summary>
    2. ///  A class used for maintaining per-object documentation
    3. /// </summary>
    4. public class Doc : MonoBehaviour
    5. {
    6.     [TextArea(3, 8)]
    7.     public string Notes;
    8. }
     
    PraetorBlue and UnityButters like this.
  3. UnityButters

    UnityButters

    Joined:
    Sep 4, 2019
    Posts:
    2
    Yep, I've been using this and pointing to the components ID. But ID mapping is a bit of pain. Thanks for the reply.