Exemple #1
0
        //------------------------------------------------------
        // factory
        //------------------------------------------------------

        public DefineSymbolStatus(BuildTargetGroup target, DefineSymbolStatus common, DefineSymbolContext context, string symbol)
        {
            this.target = target;
            this.common = common;

            var symbols = symbol.Split(';');

            toggles   = context.toggles.ConvertAll(i => new Toggle(i, symbols));
            dropdowns = context.dropdowns.ConvertAll(i => new Dropdown(i, symbols));
        }
Exemple #2
0
        //------------------------------------------------------
        // static function
        //------------------------------------------------------

        public static DefineSymbolPreset Create(string name, DefineSymbolStatus common, DefineSymbolStatus[] status)
        {
            var preset = new DefineSymbolPreset();

            preset.name          = name;
            preset.commonSymbols = common.ToSymbols();
            preset.symbols       = Array.ConvertAll(status, i => new Symbol {
                target = i.target, symbol = i.ToSymbols()
            });
            return(preset);
        }
Exemple #3
0
        void DrawEditStatus(DefineSymbolStatus status)
        {
            if (status.common != null)
            {
                EditorGUILayout.LabelField("共通");
                DrawEditStatus(status.common);
                EditorGUILayout.Space();
            }

            status.toggles.ForEach(EditStatusToggle);
            status.dropdowns.ForEach(EditStatusDropdown);
        }
Exemple #4
0
        void UpdatePlatformStatus(IDefineSymbolData data)
        {
            DefineSymbolContext commonContext, indivisualContext;

            m_context.Split(out commonContext, out indivisualContext);

            m_statusCommon = new DefineSymbolStatus(BuildTargetGroup.Unknown, null, commonContext, data.GetCommonSymbols());

            foreach (var platform in m_platforms)
            {
                platform.status = new DefineSymbolStatus(platform.target, m_statusCommon, indivisualContext,
                                                         data.GetScriptingDefineSymbolsForGroup(platform.target));
            }
        }