Serialize child ScriptableObject asset values in parent ScriptableObject asset.
Hi. I want to know if something I want to achieve is achievable.
Let's say I have a class Mission:
[CreateAssetMenu(fileName = "Mission", menuName = "Config/Mission")]
public class Mission : ScriptableObject
{
public Challenge[] Challenges;
}
and Challenge class
public class Challenge : ScriptableObject
{
public string ChallengeName;
}
There are also some classes that derive from Challenge class. After spending a whole day on trying to script some editor extension I managed to do something like this:
The problem with this approach is that I have to create challenge assets specific to every mission. So my question is: Is there any way to store child ScriptableObject values in a parent ScriptableObject asset. This way I would only need to create one asset for each type of challenge and then pass their values inside Mission asset. Thanks in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220612201638im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity3D ScriptableObject with UnityEvent not saving event parameter 0 Answers
Custom inspector - How to serialize scene objects in ScriptableObject? 0 Answers
Regarding ScriptableObjects, Inheritance and custom editors 0 Answers
Custom Editor List with child classes 1 Answer
ScriptableObject not Serializing? 0 Answers