Hi, sorry if this is the wrong place to post this.
I’ve got experience with game design, but only a little with coding, so this might be a pretty basic misunderstanding of how the editor works with scripts. I’m working on a party-based roguelite, and needed a way to have a team of characters, think Pokemon or Darkest Dungeon, with a mechanic where the player can recruit or dismiss characters. I’ve been using prefabs for the basic units, and then adding the specific stats / sprites / etc with scriptable objects, and that’s been working so far, but I can’t figure out a way to generate new scriptable objects from within the game that would act as potential recruits.
Should I not be using prefab base units at all, and instead just put all of a character’s information in one scriptable? Either way, I can’t figure out if there’s a way that I could create new temporary scriptables during runtime. I could just have a set number of blank ones created in the editor, and just change their variables at runtime, but this seems like a workaround for something that probably has a more efficient solution, and this would lead to issues with setting a roster size (the difficulty of the game scales with the number of characters being used, so I want to give the player the option to choose the size of their encounters) and with mechanics I was planning to add later, like tombstones or dismissed characters returning in later playthroughs.
Basically, I’m asking how to create scriptable objects at runtime, and whether this is something that I should be doing in the first place. Any help is appreciated!