public static void Popup(DataSaver gameSaves, DataSaverEditor.DataType dataType, Vector2 position, Action onAdd) { DataSaverEditorPopup window = ScriptableObject.CreateInstance <DataSaverEditorPopup>(); window.position = new Rect(position.x, position.y, 250, 88); window.Init(gameSaves, dataType, onAdd); window.ShowPopup(); }
void Init(DataSaver gameSaves, DataSaverEditor.DataType dataType, Action onAdd) { this.gameSaves = gameSaves; this.dataType = dataType; this.onAdd = onAdd; }