文档

Unity Engine

Unity Engine

title

Setting this field will set the complete editor title without using any of the other fields of ApplicationTitleDescriptor.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Field
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public string title

Examples

using UnityEditor;using UnityEngine;public class WindowTitleExample{ private static void CustomTitleBar(ApplicationTitleDescriptor desc) { desc.title = $"My Editor Custom Title version: {Random.value}"; } [MenuItem("Test/Setup custom title bar")] static void Setup() { EditorApplication.updateMainWindowTitle -= CustomTitleBar; // This callback will be triggered when a new scene is loaded or when Unity starts. EditorApplication.updateMainWindowTitle += CustomTitleBar; EditorApplication.UpdateMainWindowTitle(); }}