Ejemplo n.º 1
0
        private void RenderToolbar()
        {
            GUILayout.FlexibleSpace();
            bool enabled = GUI.enabled;

            GUI.enabled = !this.m_PackageController.IsUploading;
            if (GUILayout.Button("Refresh Packages", EditorStyles.toolbarButton, new GUILayoutOption[0]))
            {
                this.RefreshPackages();
            }
            if (AssetStoreManager.sDbgButtons)
            {
                GUILayout.Label("Debug: ", AssetStoreManager.Styles.ToolbarLabel, new GUILayoutOption[0]);
                if (GUILayout.Button("FileSelector", EditorStyles.toolbarButton, new GUILayoutOption[0]))
                {
                    FileSelector.Show("/", new List <string>(), delegate(List <string> newList)
                    {
                        foreach (string str in newList)
                        {
                            DebugUtils.Log(str);
                        }
                    });
                }
                if (GUILayout.Button("Logout", EditorStyles.toolbarButton, new GUILayoutOption[0]))
                {
                    AssetStoreClient.Logout();
                }
            }
            GUI.enabled = enabled;
        }
Ejemplo n.º 2
0
        public static FileSelector Show(string directory, List <string> preSelectedFiles, FileSelector.DoneCallback onFinishSelecting)
        {
            FileSelector fileSelector = EditorWindow.GetWindow(typeof(FileSelector), true, "Please Select Main Assets") as FileSelector;

            fileSelector.minSize = new Vector2(400f, 300f);
            if (!directory.EndsWith("/"))
            {
                directory += "/";
            }
            fileSelector.Init(directory, preSelectedFiles, onFinishSelecting);
            fileSelector.Show();
            return(fileSelector);
        }
Ejemplo n.º 3
0
 private void RenderDebug()
 {
     if (AssetStoreManager.sDbgButtons)
     {
         GUILayout.FlexibleSpace();
         GUILayout.Label("Debug: ", AssetStoreManager.Styles.ToolbarLabel, new GUILayoutOption[0]);
         if (GUILayout.Button("FileSelector", EditorStyles.toolbarButton, new GUILayoutOption[0]))
         {
             FileSelector.Show("/", new List <string>(), delegate(List <string> newList)
             {
                 foreach (string str in newList)
                 {
                     DebugUtils.Log(str);
                 }
             });
         }
         if (GUILayout.Button("Reload", EditorStyles.toolbarButton, new GUILayoutOption[0]))
         {
             AssetStoreAPI.GetMetaData(this.Account, this.m_PackageDataSource, delegate(string errMessage)
             {
                 if (errMessage != null)
                 {
                     Debug.LogError("Error fetching metadata: " + errMessage);
                     LoginWindow.Logout();
                     AssetStoreManager.Login("Login to fetch current list of published packages");
                     base.Repaint();
                     return;
                 }
                 this.m_PackageController.AutoSetSelected(this);
                 base.Repaint();
             });
         }
         if (GUILayout.Button("Logout", EditorStyles.toolbarButton, new GUILayoutOption[0]))
         {
             AssetStoreClient.Logout();
         }
     }
 }
Ejemplo n.º 4
0
 public static void ShowManager(string rootPath, List <string> mainAssets, FileSelector.DoneCallback onFinishChange)
 {
     FileSelector.Show(rootPath, mainAssets, onFinishChange);
 }