private void OnEnable()
        {
            _groupsGui.Add(new TemplateGUI(new List <DefineSymbol>()));

            DefineSymbolManager.GetAllGroupsWithCustomName().ForEach(CreateAndAddDrawerToList);
            DefineSymbolManager.GetAllGroupsByBuildTargetGroup().ForEach(CreateAndAddDrawerToList);
        }
Exemple #2
0
        private static void SyncWithPlayerSettings()
        {
            UnityEngine.Debug.Log("SyncWithPlayerSettings");

            var playerSettingsGroups = DefineSymbolManager.GetAllGroupsByBuildTargetGroupFromPlayerSettings();
            var savedGroups          = DefineSymbolManager.GetAllGroupsByBuildTargetGroup(); //load all cashed presets

            //может нужен какой мерж групп..
            if (playerSettingsGroups.Count > 0) //????????
            {
                foreach (var group in savedGroups)
                {
                    var index = playerSettingsGroups.FindIndex(g => g.TargetGroup == group.TargetGroup);
                    if (index > -1)
                    {
                        playerSettingsGroups.RemoveAt(index);
                        if (playerSettingsGroups.Count < 1)
                        {
                            break;
                        }
                    }
                }
            }

            //Debug.Log("except count : "+ groups.Count);
            DefineSymbolManager.Apply(savedGroups);                 //apply presets
            playerSettingsGroups.ForEach(DefineSymbolManager.Save); //save some new build targets presets
        }