Beispiel #1
0
        private void OnGUI()
        {
            UPRGUIUtil.GUI_Title("UPRTools", packageVersion);

            using (new EditorGUI.DisabledScope(EditorApplication.isCompiling))
            {
                bool tempUPRdirty = false;
                GUI_AssetProfiler(ref tempUPRdirty);

                GUILayout.Space(10);
                GUI_LuaProfiler(ref tempUPRdirty);

                //save dirtys;
                if (tempUPRdirty)
                {
                    _UPRSetting.Save();
                }
            }

            UPRGUIUtil.GUI_Bottom(this);
        }
Beispiel #2
0
        private void OnGUI()
        {
            UPRGUIUtil.GUI_Title("AssetCheckerLanucher", __Version);
            EditorGUILayout.Space();

            using (new EditorGUILayout.HorizontalScope())
            {
                EditorGUILayout.TextField("AssetChecker:", AssetCheckExcuter);
                if (GUILayout.Button("Select", GUILayout.MaxWidth(100f)))
                {
                    var tempExeVal = EditorUtility.OpenFilePanel("Select Where the AssetChecker is", Application.dataPath, "exe");
                    AssetCheckExcuter = tempExeVal;
                    this.Repaint();
                    this.Focus();
                }
            }
            if (string.IsNullOrEmpty(AssetCheckExcuter))
            {
                EditorGUILayout.HelpBox("AssetChecker not found.", MessageType.Error);
            }

            using (new EditorGUILayout.HorizontalScope())
            {
                EditorGUILayout.TextField("UnityProjectPath:", _UnityPrjPath);
                if (GUILayout.Button("Select", GUILayout.MaxWidth(100f)))
                {
                    var tempPrjVal = EditorUtility.OpenFolderPanel("Select Where the Unity Project is", Path.Combine(Application.dataPath, "../"), null);
                    if (!string.IsNullOrEmpty(tempPrjVal))
                    {
                        _UnityPrjPath = tempPrjVal;
                    }
                }
            }

            var tempIDVal = EditorGUILayout.TextField("ProjectID:", ProjectID);

            if (tempIDVal != ProjectID)
            {
                ProjectID = tempIDVal;
            }

            EditorGUILayout.Space();

            using (new EditorGUILayout.HorizontalScope())
            {
                EditorGUILayout.Space();

                if (GUILayout.Button("Check Project Settings", GUILayout.MaxWidth(150f), GUILayout.MaxHeight(50f)))
                {
                    var args = string.IsNullOrEmpty(ProjectID) ?
                               string.Format("--project={0}", _UnityPrjPath) :
                               string.Format("--project={0} --projectId={1}", _UnityPrjPath, ProjectID);
                    var tempIns = Process.Start(AssetCheckExcuter, args);
                }

                if (GUILayout.Button("Check Assetbundle", GUILayout.MaxWidth(150f), GUILayout.MaxHeight(50f)))
                {
                    var args = string.IsNullOrEmpty(ProjectID) ?
                               string.Format("abcheck --project={0}", _UnityPrjPath) :
                               string.Format("abcheck --project={0} --projectId={1}", _UnityPrjPath, ProjectID);
                    var tempIns = Process.Start(AssetCheckExcuter, args);
                }

                EditorGUILayout.Space();
            }

            UPRGUIUtil.GUI_Bottom(this);
        }