Question by
dbdenny · Nov 01, 2021 at 08:07 AM ·
serializationscriptableobjecttimeline
Unity cannot serialize nested scriptable object
I want to save a timeline playable asset as a child of a custom ScriptableObject, I do this by following code:
var data = ScriptableObject.CreateInstance<DataType>();
AssetDatabase.CreateAsset(data, "Assets/data.asset");
data.timeline = ScriptableObject.CreateInstance<TimelineAsset>();
AssetDatabase.AddObjectToAsset(data.timeline, data);
AssetDatabase.SetDirty(data);
AssetDatabase.SaveAssets();
But when I open the data.asset, it does not serialize any data for the playable asset!
Help!
Comment
Your answer

Follow this Question
Related Questions
How do you serialize Inherited ScriptableObject variables? 1 Answer
Keep data created at runtime in ScriptableObjects? 1 Answer
Serialization of ScriptableObject not hexadecimal (json) 1 Answer
Serialization issue after updating Unity from 2018.2.1 to 2019.2.6 1 Answer
How to write a Story Event System with ScriptableObjects? 0 Answers