Creating an instance of a ScriptableObject, that will not change the base asset.

Title says it all, but For Example:

I have a ScriptableObject “SwordA”. Whenever I find the Sword “SwordA”, it’s base and default values would be equal to the ScriptableObject “SwordA”‘s values. However, if I upgrade my newfound sword’s sharpness and change values of ScriptableObject “SwordA”’ in code, it changes them to the asset too. How can I create an instance of the ScriptableObject such that changing for one sword doesn’t change the base values for all new Sword “SwordA”'s I find later in the game? Can I do it without creating a private float and setting sharpness equal to it?

You can take copies of the scriptable objects under the project view, and set different properties for each sword (just like you do in prefabs). then for each sword use its corresponding scriptable object.

If you don’t want to keep each INSTANCE of “Sword” stored as a scriptable object, you will need to save those values yourself, somehow.

I would suggest this be done by storing whatever “contains” the sword instances (e.g. player, map, npc, whatever), as a scriptable object, that has a (serializable) list of “Sword” objects, each with its own individual values.

With this method, you would create an instance of your SwordA (think of it as a prefab), then add this new instance to your player/map container object, and apply all your “bonuses”. Then simply save the player/map itself as an asset, rather than saving the sword instance itself.