Exemplo n.º 1
0
    /// <summary>
    /// 加载宏定义符号
    /// </summary>
    /// <returns>核心宏定义符号</returns>
    public Dictionary <int, EditorMacroDefineSymbol> LoadMacroDefineScriptingDefineSymbols()
    {
        Dictionary <int, EditorMacroDefineSymbol> result = new Dictionary <int, EditorMacroDefineSymbol>();

        string[] defines = EditorStrayFogApplication.GetScriptingDefineSymbolsForGroup();
        Type     define  = typeof(EditorMacroDefineScriptingDefineSymbols);

        Type[] types = define.GetNestedTypes();
        if (types != null && types.Length > 0)
        {
            foreach (Type t in types)
            {
                EditorMacroDefineSymbol symbol = new EditorMacroDefineSymbol(t);
                if (!result.ContainsKey(symbol.key))
                {
                    result.Add(symbol.key, symbol);
                }
                symbol.SetCheckedFromPlayerSettings(defines);
            }
        }
        return(result);
    }