I’ve made a Character creation screen for my 2d game, the sprites used in the character creation (hair, shirt, pants, etc) are stored in a Scriptable Object. The Atlas containing those Sprites is in my Resources folder.
Once The player has finished creating his character, I save all new sprites and their color in my player data, like so:
DataManager.instance.playerData.loadOut.hair = characterSetup.hair; //hair is a Sprite
DataManager.instance.playerData.loadOut.eyebrowShape = characterSetup.eyebrowShape;
DataManager.instance.playerData.loadOut.eyeShape = characterSetup.eyeShape;
DataManager.instance.playerData.loadOut.facialHair = characterSetup.facialHair;
//...
I then Instantiate my Player in my world, and use these values to set his appearance, like so:
_character.hair = DataManager.instance.playerData.loadOut.hair;
_character.hairColor = DataManager.instance.playerData.loadOut.hairColor;
_character.facialHair = DataManager.instance.playerData.loadOut.facialHair;
//...
The problem is, this only works in editor. If I build the game and play, the only change that has any effect on the Player that gets Instantiated in my world is the skin color (where I do not reference any sprite), otherwise he has his default appearance.
It is clear that somehow my management of Sprites only work in Editor and not in a build, but what am I doing that is causing this?
Hair Sprites stored in an SO, loaded during character creation and used to set new appearance:

What my PlayerData looks like in the inspector, this is what is used to set the player appearance:

[SOLVED]