UnityEditor.ASEditorBackend.AddUser C# (CSharp) Method

AddUser() static private method

static private AddUser ( string server, string user ) : void
server string
user string
return void
        internal static void AddUser(string server, string user)
        {
            EditorPrefs.SetString("ASUser::" + server, user);
        }

Usage Example

        private void DoShowProjects()
        {
            int    result        = 0x29ed;
            string serverAddress = this.serverAddress;

            if (serverAddress.IndexOf(":") > 0)
            {
                int.TryParse(serverAddress.Substring(serverAddress.IndexOf(":") + 1), out result);
                serverAddress = serverAddress.Substring(0, serverAddress.IndexOf(":"));
            }
            AssetServer.AdminSetCredentials(serverAddress, result, this.userName, this.password);
            MaintDatabaseRecord[] recordArray = AssetServer.AdminRefreshDatabases();
            if (recordArray != null)
            {
                this.projectsList = new string[recordArray.Length];
                for (int i = 0; i < recordArray.Length; i++)
                {
                    this.projectsList[i] = recordArray[i].name;
                }
                this.projectsLv.totalRows = recordArray.Length;
                this.GetDefaultPListConfig();
                this.plc["Maint Server"]      = serverAddress;
                this.plc["Maint UserName"]    = this.userName;
                this.plc["Maint port number"] = this.port;
                this.plc.Save();
                ASEditorBackend.SetPassword(serverAddress, this.userName, this.password);
                ASEditorBackend.AddUser(this.serverAddress, this.userName);
            }
            else
            {
                this.projectsLv.totalRows = 0;
            }
        }
All Usage Examples Of UnityEditor.ASEditorBackend::AddUser