Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void AddNote(NoteScriptable note)
 {
     Notes.Add(note);
     AssetDatabase.AddObjectToAsset(note, this);
     AssetDatabase.SaveAssets();
 }