UnityEditor.EditorUtility.GetInvalidFilenameChars C# (CSharp) Method

GetInvalidFilenameChars() private method

private GetInvalidFilenameChars ( ) : string
return string
        internal static extern string GetInvalidFilenameChars();
        /// <summary>

Usage Example

示例#1
0
 private void EatInvalidChars()
 {
     if (this.isRenamingFilename)
     {
         Event current = Event.current;
         if (GUIUtility.keyboardControl == this.m_TextFieldControlID && current.GetTypeForControl(this.m_TextFieldControlID) == EventType.KeyDown)
         {
             string text = string.Empty;
             string invalidFilenameChars = EditorUtility.GetInvalidFilenameChars();
             if (invalidFilenameChars.IndexOf(current.character) > -1)
             {
                 text = "A file name can't contain any of the following characters:\t" + invalidFilenameChars;
             }
             if (text != string.Empty)
             {
                 current.Use();
                 this.ShowMessage(text);
             }
             else
             {
                 this.RemoveMessage();
             }
         }
         if (current.type == EventType.Repaint)
         {
             Rect screenRect = this.GetScreenRect();
             if (!Mathf.Approximately(this.m_LastScreenPosition.x, screenRect.x) || !Mathf.Approximately(this.m_LastScreenPosition.y, screenRect.y))
             {
                 this.RemoveMessage();
             }
             this.m_LastScreenPosition = screenRect;
         }
     }
 }
All Usage Examples Of UnityEditor.EditorUtility::GetInvalidFilenameChars
EditorUtility