Markup-Attributes
NaughtyAttributes
Our great sponsors
Markup-Attributes | NaughtyAttributes | |
---|---|---|
3 | 36 | |
275 | 4,264 | |
- | - | |
0.0 | 0.0 | |
almost 2 years ago | 5 months ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Markup-Attributes
-
I have a massive list of variables in the inspector that keeps clogging my script, making it super tedious to work on. Is their any way I could group them all together in a folder and just close and open the folder in the inspector? Like a more advanced Header for groups of variables?
Unfortunately, attributes can only annotate members or types, not scopes. NaughtyAttributes, as suggested below, is excellent, but I find MarkupAttributes to be even more elegant -- just one attribute is needed for a foldout group, as opposed to the same attribute on every field.
-
Is Odin still worth it?
Markup Attributes - Does layout and grouping of fields using attributes. I find it's styling to be the most inline with native Unity, and most likely what I will be in my next project. It also supports material editors. Overall it is quite light weight, and good quality.
-
I made an open source plugin for controlling editor layout with attributes. It works in C# and in ShaderLab. Link in the comments.
Here is the link: https://github.com/gasgiant/MarkupAttributes
NaughtyAttributes
-
How do you implement static string, I use it like this but im not sure if it's a good way
NaughtyAttributes is a free plugin that allows you to do so. By using attributes you can make your fields a lot easier to manage. For example [Tag] is an attribute that allows your string to be directly linked to the corresponding tag.
-
How do you handle the constant null checking?
In Unity, you could use NaughtyAttributes and then use the [Required] attribute to indicate that a value is mandatory.
-
I love collecting free/MIT utility code for Unity to add to my projects. Let's share some!
NaughtyAttributes https://github.com/dbrizov/NaughtyAttributes is amazing for quickly and easily customizing script inspectors without having to resort to a full custom inspector GUI
-
how can I make this button?
Naughty Attributes is your friend
-
It's staggering how online resources don't even come close to teaching you what you learn from a production environment
It's a professional team of ~15. Being able to customize the display of data within the Inspector makes it much easier for less technical team members to tune and create.
-
What are your favorite productivity tools? Especially lesser-known or free ones?
I personally love Naughty Attributes: https://github.com/dbrizov/NaughtyAttributes which makes it easy to add inspector buttons to functions.
-
Call a Method via Button in the Inspector
I went and looked for the open source version I mentioned - https://github.com/dbrizov/NaughtyAttributes
-
Share the tools you use for game design, coding and narrative
For Unity, I strongly recommend something like NaughtyAttributes to help expose your data in the Inspector with better widgets and validation. (There are paid alternatives too. Odin might accomplish a lot of the same?)
- Is there custom editors or editor tools you can't do without?
-
Is it possible to toggle a field serialization on bool value? (true=serialize, false= deserialize)
There's also free alternatives like naughty attributes which has a HideIf attribute too
What are some alternatives?
Unity-SerializeReferenceExtensions - Provide popup to specify the type of the field serialized by the [SerializeReference] attribute in the inspector.
UnitySerializedDictionary - Serialized and drawed in editor Dictionary
Serially - Adds a unity-supported, SerializableType class and an inspector for editing SerializeReference fields.
dear-imgui-unity - Unity package for Dear ImGui
Unity-SerializableDictionary - Serializable dictionary class for Unity
Bewildered-Core - Common use data types, and utilities for Unity that are high-quality and feel like a native part of Unity
Unity-Editor-Toolbox - Tools, custom attributes, drawers, hierarchy overlay, and other extensions for the Unity Editor.
MessageKit - Decoupled message sending system meant as a replacement for SendMessage and its variants.