Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            mTarget.runInBackground = PlayerSettings.runInBackground =
                EditorGUILayout.Toggle("runInBackground", mTarget.runInBackground);

            GUILayoutOption[] guiOpts = new GUILayoutOption[]
            {
                GUILayout.Width(30),
                GUILayout.ExpandWidth(true),
            };

            mTarget.Version.Draw(0, guiOpts);


            EditorGUILayout.Space();

            // Bundles
            showBundles = EditorGUILayout.Foldout(showBundles, "AssetBundle", true);
            if (showBundles)
            {
                EditorGUILayout.LabelField("HttpRoot");
                EditorGUILayout.BeginHorizontal();
                {
                    mTarget.Ip   = EditorGUILayout.TextField(mTarget.Ip);
                    mTarget.Port = EditorGUILayout.TextField(mTarget.Port);
                }
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.Space();

                using (var verticalScope2 = new EditorGUILayout.VerticalScope("box"))
                {
                    DrawBundleConfig(guiOpts);
                    verticalScope2.Dispose();
                }
            }

            //apk ios.proj exe app etc.
            Inspector.DrawList("Channels", mTarget.Channels, ref showBuilds, false, item =>
            {
                var i = item as ChannelConfig;
                if (string.IsNullOrEmpty(i.Name))
                {
                    i.Name = i.Channel + ":" + (int)i.Channel;
                }
                i.AfterDraw();
            });

            Inspector.DrawList("Configs", mTarget.Configs, ref showConfigs, false, null);

            // Inspector.DrawList("XLuaConfig", XLuaConfigUnityEngine, ref showXLuaConfig);

            // server
            Inspector.DrawComObj("BundleServer", mTarget.BundleServer);

            mTarget.DrawSaveButton();

            if (GUI.changed)
            {
                AppLog.LogLevel = mTarget.LogLevel;
                PlayerSettings.bundleVersion = mTarget.Version.ToString();
                EditorUtility.SetDirty(mTarget);
            }
        }