GetUniqueName() private method

private GetUniqueName ( string existingNames, string name ) : string
existingNames string
name string
return string
            public EnterNamePopup(SerializedProperty tags, TagManagerInspector.EnterNamePopup.EnterDelegate cb)
            {
                this.EnterCB = cb;
                List <string> list = new List <string>();

                for (int i = 0; i < tags.arraySize; i++)
                {
                    string stringValue = tags.GetArrayElementAtIndex(i).stringValue;
                    if (!string.IsNullOrEmpty(stringValue))
                    {
                        list.Add(stringValue);
                    }
                }
                this.m_NewTagName = ObjectNames.GetUniqueName(list.ToArray(), this.m_NewTagName);
            }
            public EnterNamePopup(SerializedProperty tags, EnterDelegate cb)
            {
                EnterCB = cb;


                List <string> existingTagNames = new List <string>();

                for (int i = 0; i < tags.arraySize; i++)
                {
                    string tagName = tags.GetArrayElementAtIndex(i).stringValue;
                    if (!string.IsNullOrEmpty(tagName))
                    {
                        existingTagNames.Add(tagName);
                    }
                }
                m_NewTagName = ObjectNames.GetUniqueName(existingTagNames.ToArray(), m_NewTagName);
            }