Version: 2023.1

LightingWindowTab

class in UnityEditor

切换到手册

描述

Base class to add custom tabs to the Lighting window.

using UnityEditor;
using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;

class CustomLightingTab : LightingWindowTab { public override void OnEnable() { titleContent = new GUIContent("Custom"); priority = 1; // This tab will be the second option in the toolbar }

public override void OnGUI() { EditorGUILayout.LabelField("My Custom Lighting Tab !!"); } }

In this example, a new section is added in the Lighting window with the name Custom.

变量

priorityThe priority of the tab in the header toolbar.
titleContent选项卡的名称。

公共函数

FocusTabFocusTab will open the lighting window with this tab selected.
OnBakeButtonGUIOnBakeButtonGUI is called to draw a button at the bottom of the tab.
OnDisable当不再使用此 Inspector 覆盖时,将调用 OnDisable。
OnEnable当使用此 Inspector 覆盖时,将调用 OnEnable。
OnGUIA callback that is called when drawing the main section of the tab.
OnHeaderSettingsGUIA callback that is called when drawing the header icons in the top right of the tab.
OnSelectionChangeCalled when the selection changes.
OnSummaryGUIA callback that is called when drawing the bottom section of the tab.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961