public void CreateDialogueOption() { DialogueOption newOption = new DialogueOption(); newOption.OptionID = EditorInfo.Options; CurrentOptions.Add(newOption); EditorInfo.Windows.Add(new Rect(10 + scrollPosition.x, 10 + scrollPosition.y, 200, 5)); EditorInfo.WindowTypes.Add(NodeType.Option); EditorInfo.NodeTypesIDs.Add(EditorInfo.Options++); EditorInfo.OptionsIndexes.Add(EditorInfo.Windows.Count - 1); WriteDebug("Adding option"); SaveChanges("Create Dialogue Option"); }