Beispiel #1
0
 /// <inheritdoc />
 private SceneSwitcherSettingsProvider(IEnumerable <string> keywords = null) : base("Project/Quick Scenes", SettingsScope.Project, keywords)
 {
     _configUi = new QuickScenesConfigUi(ConfigData.instance.SceneAssets);
     _configUi.RefreshClick += () => _configUi.UpdateData(ConfigData.instance.SceneAssets);
     _configUi.SaveClick    += scenes =>
     {
         ConfigData.instance.SceneAssets = scenes.ToList();
         QuickScenesWindow.Refresh();
     };
 }
Beispiel #2
0
        private void Init()
        {
            _configUi = new QuickScenesConfigUi(ConfigData.instance.SceneAssets);
            SetWindowSize(_configUi.DisplayingScenes.Count);

            _configUi.LayoutChanged += () => SetWindowSize(_configUi.DisplayingScenes.Count);
            _configUi.RefreshClick  += () => _configUi.UpdateData(ConfigData.instance.SceneAssets);
            _configUi.CancelClick   += Close;
            _configUi.SaveClick     += scenes =>
            {
                ConfigData.instance.SceneAssets = scenes.ToList();
                QuickScenesWindow.Refresh();
                Close();
            };
        }