Tetra Attributes
Tetra Creations
$0.0
Date |
Price |
---|---|
Date |
Price($) |
07/21(2023) |
0.0 |
11/27(2024) |
0.0 |
Jump AssetStore
Keep your inspector and editor window organised and clear with this small collection of attributes.This is a collection of C# attributes for the Unity editor that I use in most of my projects. Some are essential, like ReadOnly, which I've been using for several years. While others like Title are more for keeping the inspector window organised and clear.Once imported simply add this line to your file header to use any attributes :using TetraCreations.Attributes;Attributes 📌[Tile] : Alternative to Header attribute but with a line to separate the title from other fields.[ReadOnly] : Used to disable modifications to a serialized field.[DrawIf] : Draw a property field if the condition is true. (Only for Boolean and Enum)[HelpBox] : Display an help box in the inspector with a message and a type (None, Info, Warning, Error)[MinMaxSlider] : Show a slider with minimum and maximum values for a Vector2.[SnappedSlider] : Draw a slider to increase an integer or a float value by a certain amount (step) and clamped by a minimum and a maximum value. (Only for Integer and Float)[Required] : Draw an Help Box (Error Type) if a field value is empty or null.[PathReference] : Store a reference to an asset folder in the editor.[Button] : Draw button in the inspector, it needs to be used with a method and not a field.[SpritePreview] : Draw the texture below a sprite field.[Tags] : Display a dropdown with all available tags.Documentation 📝A demo scene with a single script using every attributes.Offline documentation included in PDF and Markdown with some code examples and screenshots of the inpector window.Also available online here : DocumentationCompatibility ✅Tested and verified on Unity 2019.4 and Unity 2021.3.Build made using Unity 2021.3 without any errors.Since attributes are only meant to be used inside the Editor, they are not included in your build.