public static MacroDefineGroup Convert(string InStr)
            {
                string[] item = InStr.Split('@');

                if (string.IsNullOrEmpty(item[1]))
                {
                    return(new MacroDefineGroup(item[0], bool.Parse(item[2]), bool.Parse(item[3])));
                }
                else
                {
                    string[]           defines     = item[1].Split('|');
                    int                len         = defines.Length;
                    List <MacroDefine> defineGroup = new List <MacroDefine>(len > 32 ? len : 32);
                    for (int i = 0; i < len; i++)
                    {
                        defineGroup.Add(MacroDefine.Convert(defines[i]));
                    }
                    return(new MacroDefineGroup(item[0], defineGroup, bool.Parse(item[2]), bool.Parse(item[3])));
                }
            }
        private void Load()
        {
            string allDefineStr;

            if (string.IsNullOrEmpty(allDefineStr = EditorPrefs.GetString(ScriptingDefineConfig.ALL_DEFINE_PREFS_KEY_S, string.Empty)))
            {
                //ADS; AD_DEBUG; UNIT_TEST
                allDefine = new List <MacroDefine>(32)
                {
                    new MacroDefine(ScriptingDefineConfig.TEST_MACRO_DEFINE_S, false),
                    new MacroDefine(ScriptingDefineConfig.DEBUG_MACRO_DEFINE_S, false)
                };

                defineGroup = new Dictionary <int, MacroDefineGroup>(16)
                {
                    {
                        0,
                        new MacroDefineGroup(ScriptingDefineConfig.EMPTY_MODE_NAME_S,
                                             null,
                                             false,
                                             false)
                    },
                    {
                        1,
                        new MacroDefineGroup(ScriptingDefineConfig.TEST_MODE_NAME_S,
                                             new List <MacroDefine>(16)
                        {
                            allDefine[0]
                        },
                                             false,
                                             true)
                    },
                    {
                        2,
                        new MacroDefineGroup(ScriptingDefineConfig.DEBUG_MODE_NAME_S,
                                             new List <MacroDefine>(16)
                        {
                            allDefine[1]
                        },
                                             false,
                                             true)
                    },
                    {
                        3,
                        new MacroDefineGroup(ScriptingDefineConfig.RELEASE_MODE_NAME_S,
                                             new List <MacroDefine>(16),
                                             false,
                                             true)
                    }
                };

                Save();
            }
            else
            {
                string[] allDefineItem = allDefineStr.Split(',');
                int      len           = allDefineItem.Length - 1;
                allDefine = new List <MacroDefine>(len > 32 ? len : 32);
                for (int i = 0; i < len; i++)
                {
                    allDefine.Add(MacroDefine.Convert(allDefineItem[i]));
                }

                string[] defineGroupItem = EditorPrefs.GetString(ScriptingDefineConfig.DEFINE_GROUP_PREFS_KEY_S).Split(',');
                len         = defineGroupItem.Length - 1;
                defineGroup = new Dictionary <int, MacroDefineGroup>(len > 16 ? len : 16);
                for (int i = 0; i < len; i++)
                {
                    defineGroup.Add(i, MacroDefineGroup.Convert(defineGroupItem[i]));
                }
            }
        }