/// <summary> /// Creates a new tooltip with a title, a summary, and an optional array of characters for the shortcut. /// /// To specify modifier keys, use the Windows control keys. ProBuilder manages switching to Linux /// control keys for the macOS and Linux versions of the Unity Editor. /// </summary> /// <param name="title">The header text for this tooltip.</param> /// <param name="summary">The body of the tooltip text. This should be kept brief.</param> /// <param name="shortcut">A set of keys to be displayed as the shortcut for this action.</param> public TooltipContent(string title, string summary, params char[] shortcut) : this(title, summary, "") { if (shortcut != null && shortcut.Length > 0) { this.shortcut = string.Empty; for (int i = 0; i < shortcut.Length - 1; i++) { if (!EditorUtility.IsUnix()) { this.shortcut += InternalUtility.ControlKeyString(shortcut[i]) + " + "; } else { this.shortcut += shortcut[i] + " + "; } } if (!EditorUtility.IsUnix()) { this.shortcut += InternalUtility.ControlKeyString(shortcut[shortcut.Length - 1]); } else { this.shortcut += shortcut[shortcut.Length - 1]; } } }