Skip to content

Instantly share code, notes, and snippets.

@0xdw
Created January 24, 2021 13:46
Show Gist options
  • Save 0xdw/ba03cd6c112204a8e91c42c38950f3c7 to your computer and use it in GitHub Desktop.
Save 0xdw/ba03cd6c112204a8e91c42c38950f3c7 to your computer and use it in GitHub Desktop.
Unity - Add a description to a custom script
using UnityEngine;
public class GameManager : MonoBehaviour { }
using UnityEditor;
/**
* Remember that you need to save this .cs inside any Editor folder
*/
[CustomEditor(typeof(GameManager))]
public class GameManagerEditor : Editor {
public override void OnInspectorGUI() {
EditorGUILayout.HelpBox(
"Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quos, explicabo",
MessageType.Info
);
EditorGUILayout.Separator();
base.OnInspectorGUI();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment