<aside> ℹ️ Applies to versions 2.1.x or newer.

</aside>

Save categories allow you to organise your save objects in the save editor. Handy if you have a lot of different objects or just like organising things. Save categories can only be applied to save objects by design with an attribute. You can define a save category on a save object like so:

[SaveCategory("My Save Category")]
[CreateAssetMenu]
public class MyClass : SaveObject
{
    public SaveValue<bool> myBoolSaveValue;
    public SaveValue<Vector2> myVecSaveValue = new SaveValue<Vector2>("MySaveKey");
    [SerializedField] private SaveValue<int> myIntSave = new SaveValue<int>("MyIntSaveKey", 100);
}

Whatever string you put in the [SaveCategory("")] section will be the category it will be sorted into. Note the name is case sensitive. You can define the order as well by adding a number greater or less than 0 in the 2nd parameter of the attribute.

Untitled

For the categories to show in the editor window you will need to have the editor setting “Show Save Categories” on. Otherwise the asset will show the save objects in their traditional ordering.

An example below of a custom category in use:

Untitled