How to Add Notes in Inspector?

Hello,

Any ideas how these notes are added to the inspector?

In the code, it’s not obvious.

I just answered an older question with a much more elegant solution to this problem. I was looking to do the same and didn’t like the suggested answers.

Checkout my forum post for the best method:

https://forum.unity3d.com/threads/helpattribute-allows-you-to-use-helpbox-in-the-unity-inspector-window.462768/

You will have to create a custom editor window for your script.

or you can use a custom property drawer for that…

As a conclusion is not done from the monobehaviour script if that is what you are wondering.

You can follow this example and then improve it for your needs:
http://forum.unity3d.com/threads/add-info-text-notes-into-the-inspector.265330/

Also look for the answers to a similar question here:

If your looking for something permanent for the Inspector like that you could use the code below. I use this method to put notes in my inspector. Just change them whenever you need :slight_smile:

[Header("TYPE WHATEVER YOU WANT TO SAY HERE")]

Building on what DoomPriestK said… Add this to any script:

[Header("---- My Task List ----")]
    public string[ ] tasks;

View in the inspector…
Change the array length to match the number of tasks, write tasks.
You can drag your tasks in any order now.


Another option…

Make a new Text File…

Write your tasks:

XX TASKS XX
Task 1
Task 2

In Unity, add a 2nd ‘Inspector’ window… click on your text file… lock your 2nd Inspector window.
(How to create a 2nd Inspector? Click the 3 dots at the top of any small window, choose ‘Add Tab’, ‘Inspector’.)