UnityEditor.ObjectNames.GetUniqueName C# (CSharp) Method

GetUniqueName() private method

private GetUniqueName ( string existingNames, string name ) : string
existingNames string
name string
return string
        public static extern string GetUniqueName(string[] existingNames, string name);
        [Obsolete("Please use NicifyVariableName instead")]

Usage Example

            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);
            }
All Usage Examples Of UnityEditor.ObjectNames::GetUniqueName