0

I have a question about scriptable objects. I know that making changes on scriptable objects during run time permanently affects its values.

For my use case, I'm trying to create a game (similar to slay the spire) and created a Card scriptable object.

How can I create an upgrade system for the cards that don't modify the original scriptable objects variables (e.g., card attack)?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • 1
    It’s not entirely clear what you are trying to do other than you want to modify something at runtime. Please explain in detail but without mentioning scriptable objects as I think thats an XY Problem. –  Jun 26 '22 at 11:32
  • What are "scriptable objects" (in this context)? Is it a concept in Unity? Or is it the literal class "ScriptableObject" (instances of that class)? – Peter Mortensen Jun 26 '22 at 20:56

1 Answers1

0

IMO, you shouldn't change ScriptableObject values at runtime. You can create a copy of it and then edit them freely.

You can think about List with ScriptableObjects for each upgrade: NormalSoldier_Tier1, NormalSoldier_Tier2...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Wolfik
  • 286
  • 2
  • 7
  • 22