- Home /
Make ScriptableObject assets customizable.
Hey. I'm not sure if this is something i can do with scriptable object assets. Not even sure how to describe the thing i want, i am not a native english speaker. But i will try:
i am building an component-based ability system with scriptable objects. I want to have components like "do damage", "apply poison", "apply burn", "heal" and so on. I want be able to put them together. The problem is that when i make "Do Damage" as Scriptable Object and then create the asset i need to give a fixed value how much damage is done. i do not want to make an asset for every damage value.
i want to have an array of Ability Components. Then When i put a component in, i want be able to customize the value of it. is there a way to do that somehow?
You have some advices?
Answer by MUG806 · Feb 26, 2021 at 01:14 PM
In short, no, scriptable objects are meant to be static. What you are after is just a normal script, class or struct.
What you could do is create a container class, which takes your scriptable object but also has a field into which you can put the value, but you might be better off just using an enum of possible effects instead of using a scriptable object at all.