unity editor script fill a scriptableobject serialized field code example
Example: unity editor script fill a scriptableobject serialized field
string myAudioClipPath = "Assets/myAudioClip.mp3";
MyScriptableObject asset = MyScriptableObject.CreateInstance<MyScriptableObject>();
asset.myAudioClip = AssetDatabase.LoadAssetAtPath<AudioClip>(myAudioClipPath);