Remember skin swap choices on loading new scene? Using Sprite Asset Libraries

Hello! Apologies if this is the wrong forum, this is my first time posting on the Unity forums.

I am looking to change my game’s character customizer from an older complicated custom system to using the Sprite Library Assets system instead. I have the SLA version functioning how I want in the character customizer screen, but I am not sure how to make the character sprite asset remember which Sprite Library Assets were assigned to it as I load into new screens.

I had someone create the base of my previous customizer system for me, which is why I’m struggling with this bit specifically. In my former customizer system, there is a “Remember Customizations” script that basically serializes the data that’s been chosen and that script will call the customization data whenever a scene is reloaded, so long as the script is on the character sprite. I am not advanced enough at coding to even know where to begin setting up a script like this to remember the assigned Sprite Library Assets.

If it helps, I’m swapping the sprites in my customizer using a very simple script like this:

public class SALSwap : MonoBehaviour
{
    public SpriteLibraryAsset[] skins;

    public void SetFemBody()
    {
        ChangeSkin(skins[0]);
    }

    public void SetMascBody()
    {
        ChangeSkin(skins[1]);
    }

    public void ChangeSkin(SpriteLibraryAsset skin)
    {
        GetComponent<SpriteLibrary>().spriteLibraryAsset = skin;
    }

}

Could anyone guide me in the right direction on how to retain which Sprite Library Assets were assigned throughout different scenes? Thank you!

You should be able to use a scriptable object which retains the users choice even when the scene is changed.

You would just have to reset it in your selection menu or else the choice will stay even after restarting the game.

I would take a look at this as well: Create SpriteLibraryAsset by Scripts