Community Made Tools

Have you made any useful utilities with Odin?

Login and submit your creations here

Inline Partial - for keeping foldout menu while having immidiete fields without opening foldout

Authored by Prographers
Shared 28-02-2022

Allows for keeping foldout menu as default but also allows for more custom options of adding custom inline properties next to foldout group (I wonder why this is not a default behavior of InlinePropery)

Here is an example of how you could present a custom attribute.

Usage - expand horizontally

[InlinePartial]
public class SomeScriptableObject
{
    [HideLabel]
    [InlineProperty]
    public int SomeInt;

    [HideLabel]
    [InlineProperty]
    public int SomeInt2;
}

Usage - expand vertically

[InlinePartial(true)]
public class SomeScriptableObject
{
    [HideLabel]
    [InlineProperty]
    [ShowInFoldoutEditorAttribute] // Show inline and in foldout
    public int SomeInt;

    [HideLabel]
    [InlineProperty]
    public int SomeInt2;
}

GitHub