Progression SO with multiple classes selection

Hi,

I was wondering what is the best practice in using the progression scriptable object for the character selection in the main menu.

So let’s say in the main menu I can chose from the 3 basic classes: Warrior, Archer, Mage, and based on what I select I want the scriptable object to change the class accordingly.

What I have done is using a Singleton Pattern, which works fine, however I wanted to know if is there a better way to do it. I also thought about using PlayerPrefs or LoadSceneAsync, however it doesn’t seem making a big difference.

Many thanks.

In the main menu, when you create a new character, make sure you have a Player in the scene. When you make a class choice, have BaseStats CaptureState() that choice and then Restore it when loaded.
Essentially, you’re going to Save the character just before you enter the game for the first time, and the character class will be baked into the save file.

This also works for customizable characters like InfinityPBR humans, Synty’s Modular Fantasy Heroes, or Blink’s human character. Craft the character in the new character screen and capture the parameters that make that character.

Hi Brian, many thanks for the answer, I did not even thought about having the player prefab in the Main Menu scene and basically use the saving system to save the character class selection.
Thank you again.

Glad to help! In the final course of the series, we actually put a dummy player in the main menu scene. It’s not there for customization, just for pretties, but it seems to me that this is the right place to customize the character.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms