Ejemplo n.º 1
0
        //------------------------------------------------------
        // unity system function
        //------------------------------------------------------

        void OnEnable()
        {
            s_instane = this;

            titleContent = new GUIContent("DefineSymbol Editor");
            minSize      = new Vector2(570f, 380f);

            m_platforms = Array.ConvertAll(kTargets, i => new DefineSymbolPlatformData(i));
            m_current   = Array.Find(m_platforms, i => i.target == EditorUserBuildSettings.selectedBuildTargetGroup) ?? m_platforms[0];

            m_data    = DefineSymbolData.Load();
            m_context = new DefineSymbolContext(m_data.context);

            InitGUI();
            UpdatePresetLabels();
            SetSymbolMode();
        }
Ejemplo n.º 2
0
        //------------------------------------------------------
        // accessor
        //------------------------------------------------------

        /// <returns>null:保存されてない string.Empty:見つかったけど空だっただけ</returns>
        public static string GetScriptDefineSymbol(string presetName, BuildTargetGroup targetGroup)
        {
            var data = DefineSymbolData.Load();

            return(data.GetPresetSymbols(presetName, targetGroup));
        }