Multiple Nested ScriptableObjects

I’m trying to create nested ScriptableObjects. So far I can add a child ScriptableObject to a parent object using AssetDatabase.AddObjectToAsset which is good. However, attempting to add a sub child object to the child adds the sub child to the parent instead. This is the code I’m using:

public void CreateNestedStructure()
    var parent = CreateInstance<ScriptableObject>(); = "Parent";
    AssetDatabase.CreateAsset(parent, "Assets/Parent.asset");
    var child = CreateInstance<ScriptableObject>(); = "Child";
    AssetDatabase.AddObjectToAsset(child, parent);
    var subChild = CreateInstance<ScriptableObject>(); = "Sub Child";
    AssetDatabase.AddObjectToAsset(subChild, child);

This is the result


I wish to have the Sub Child reside inside Child, to make the file structure more organized. I assume the problem is that Child is an object of the Parent asset and not an asset itself. Is it possible to achieve this structure somehow?

Anyone? Im need it too! if you already solved pls tellme your soluction!

For some reason it is impossible. Unity simple doesn’t allow having multiple nesting levels for ScriptableObjects.

If you add “Sub Child” to “Child” you will have “Sub Child” under “Child”.
And if you than add “Child” to “Parent” you will have “Sub Child” and “Child” under “Parent” at the same level.