void SaveSelectedBackground() { BackgroundEntry bke = (BackgroundEntry)backgroundLibrary.GetEntryByIndex(selBackground); bke.CopyValues(backgroundValues); Undo.RecordObject(bke, "Updated background"); EditorUtility.SetDirty(bke); }
void SelectBackground() { if (selBackground == -1) { // Nothing selected backgroundValues.ResetValues(); } else { // Something selected BackgroundEntry bke = (BackgroundEntry)backgroundLibrary.GetEntryByIndex(selBackground); backgroundValues.CopyValues(bke); } }