Created
January 24, 2021 13:46
-
-
Save 0xdw/ba03cd6c112204a8e91c42c38950f3c7 to your computer and use it in GitHub Desktop.
Unity - Add a description to a custom script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class GameManager : MonoBehaviour { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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