Skip to content

A collection of helpful Unity scripts and editor tools, purely for convenience. Such tools include allowing for "Read Only" inspector elements, serializable versions of Unity primitive classes, and Help boxes in the Unity Inspector.

Notifications You must be signed in to change notification settings

SimpleDevs-Tools/UnityUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityEditorUtils

A collection of helpful Unity scripts and editor tools, purely for convenience.


ReadOnly

Source: FuzzyLogic's answer in the Unity forums

To convert any field into a ReadOnly column:

[ReadOnly] public float example;

Help Box

Source: unity-inspector-help

Add a help text box info into your inspector.

By default, you can just use:

[Help("This is some help text!")] public float example = 1000f;

You can add an optional parameter that changes the icon that appears with the help box:

  • UnityEditor.MessageType.Info : The default icon.
  • UnityEditor.MessageType.Error : A red error icon.
  • UnityEditor.MessageType.Warning : A yellow warning icon.
  • UnityEditor.MessageType.None : Removes the icon, leaving only the text.
#if UNITY_EDITOR [Help("This is some help text!", UnityEditor.MessageType.None)] #endif public float example = 1000f;

About

A collection of helpful Unity scripts and editor tools, purely for convenience. Such tools include allowing for "Read Only" inspector elements, serializable versions of Unity primitive classes, and Help boxes in the Unity Inspector.

Topics

Resources

Stars

Watchers

Forks

Languages