public static void AddNoteToBook() { var path = string.Format("Assets/Resources/NewNotebook.asset"); var notebook = AssetDatabase.LoadAssetAtPath <NotebookScriptable>(path); var noteC = NoteScriptable.Create("NoteC"); notebook.AddNote(noteC); }
public static void CreateNotebook() { var notebook = NotebookScriptable.Create("NewNotebook"); var noteA = NoteScriptable.Create("NoteA"); noteA.name = "InitNote"; noteA.noteName = "InitNote"; noteA.data = "Contents go here."; notebook.AddNote(noteA); }
public void AddNote(NoteScriptable note) { Notes.Add(note); AssetDatabase.AddObjectToAsset(note, this); AssetDatabase.SaveAssets(); }