Version: 2023.1
LanguageEnglish
  • C#

EditorWindowTitleAttribute

class in UnityEditor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Use this class to set title text and icon for an Editor window.

Unity displays the text in the window's title bar. If the window is dockable, Unity displays the text and icon in the window's tab. Icons must be .png files. The recommended size is 16x16 pixels for regular icons, and 32x32 pixels for large variants used on HiDPI devices (see below). Icons can have variants for different contexts. Variants must be in the same folder as the default icon, and must have the same name, with specific text prepended or appended. If a has d_ prepended to its name (for example, d_MyWindowIcon.png) Unity uses instead of the default icon when the professional theme is enabled. If a variant has @2x appended to its name, before the file extension (for example, @@MyWindowIcon@2x.png@@), Unity uses it when you run the Editor on HiDPI devices. Unity finds and uses variants automatically. If it cannot find the variant it needs, it uses the next closest variant. If no variants exist, Unity uses the default icon.

Properties

iconSpecifies the path to an Editor window's default icon.
titleSpecifies an Editor window's title text.
useTypeNameAsIconNameWhen set to true Unity sets the window's icon name to be the same as its type name.

Constructors

EditorWindowTitleAttributeCreates Editor window title content.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961