Decorators

Title

Displays a big title in the inspector to create different sections.

Supported property types

Everything.

Parameters

  • Title

  • TextColor

  • BackgroundColor

  • IconPath

Code Example

using UltimateAttributesPack;

public class TitleExample : MonoBehaviour
    {
        // If color is not defined, it use the base text color of the inspector
        [Title("Float")]
        public float firstFloat;
        public float secondFloat;

        // You can use predefined colors ("black", "blue", "cyan", "green", "grey", "magenta", "red", "white", "yellow", "orange", "pink", "purple", "light green", "light blue", "brown", "dark blue")
        [Title("Integers", "white", "light blue")]
        public int firstInt;
        public int secondInt;

        // You can also use exadecimal for the color
        [Title("Booleans", "E6B997", "FFFBDC")]
        public bool firstBool;
        public bool secondBool;

        // You can set an icon path that will be displayed at the left of the title
        [Title("Strings", "444746", "grey", "Assets/UltimateAttributesPack/Examples/Assets/Icons/PenIcon.png")]
        public string firstString;
        public string secondString;
    }

SubTitle

Displays a subtitle in the inspector to create different sub-sections.

Supported property types

Everything.

Parameters

  • Title

  • TextColor

  • BackgroundColor

  • IconPath

Code Example

using UltimateAttributesPack;

public class SubTitleExample : MonoBehaviour
    {
        // If color is not defined, it use the base text color of the inspector
        [SubTitle("Float")]
        public float firstFloat;
        public float secondFloat;

        // You can use predefined colors ("black", "blue", "cyan", "green", "grey", "magenta", "red", "white", "yellow", "orange", "pink", "purple", "light green", "light blue", "brown", "dark blue")
        [SubTitle("Integers", "white", "light blue")]
        public int firstInt;
        public int secondInt;

        // You can also use exadecimal for the color
        [SubTitle("Booleans", "E6B997", "FFFBDC")]
        public bool firstBool;
        public bool secondBool;

        // You can set a icon path that will be displayed at the left of the subtitle
        [SubTitle("Strings", "444746", "grey", "Assets/UltimateAttributesPack/Examples/Assets/Icons/PenIcon.png")]
        public string firstString;
        public string secondString;
    }

LineTitle

Displays a line title in the inspector to create different sections.

Supported property types

Everything.

Parameters

  • Title

  • TextColor

  • LineColor

Code Example

using UltimateAttributesPack;

public class LineTitleExample : MonoBehaviour
    {
        // If color is not defined, it use the base text color of the inspector
        [LineTitle("Float")]
        public float firstFloat;
        public float secondFloat;

        // You can use predefined colors ("black", "blue", "cyan", "green", "grey", "magenta", "red", "white", "yellow", "orange", "pink", "purple", "light green", "light blue", "brown", "dark blue")
        [LineTitle("Integers", "white", "light blue")]
        public int firstInt;
        public int secondInt;

        // You can also use exadecimal for the color
        [LineTitle("Booleans", "E6B997", "FFFBDC")]
        public bool firstBool;
        public bool secondBool;
    }

Line

Displays a line in the inspector to separate sections.

Supported property types

Everything.

Parameters

  • Color

Code Example

using UltimateAttributesPack;

public class LineExample : MonoBehaviour
    {
        // If color is not defined, it use the base text color of the inspector
        [Line]
        public int intValue;

        // You can use predefined colors ("black", "blue", "cyan", "green", "grey", "magenta", "red", "white", "yellow", "orange", "pink", "purple", "light green", "light blue", "brown", "dark blue")
        [Line("light blue")]
        public float floatValue;

        // You can also use exadecimal for the color
        [Line("34A853")]
        public Vector3 vector;
    }

HelpBox

Displays an helpbox in the inspector to show additional informations.

Supported property types

Everything.

Parameters

  • HelpText

  • MessageType

Code Example

using UltimateAttributesPack;

public class HelpBoxExample : MonoBehaviour
    {
        // You can show an helpbox without message type to just show the text
        [HelpBox("This is an helpbox", HelpBoxMessageType.None)]
        public bool boolValue;

        // If you don't define message type, it display an info helpbox
        [HelpBox("This is an info helpbox")]
        public int intValue;

        // You can set the message type as you want (None, Info, Warning, Error)
        [HelpBox("This is a warning helpbox", HelpBoxMessageType.Warning)]
        public float floatValue;

        [HelpBox("This is an error helpbox", HelpBoxMessageType.Error)]
        public string stringValue;
    }


Last updated