首页 > 其他分享 >Unity builtin GUIStyle内置样式

Unity builtin GUIStyle内置样式

时间:2023-12-01 22:45:26浏览次数:58  
标签:node OL flow builtin shader Unity var GUIStyle TL

https://gist.github.com/bikrone/666bb26fb0d4468df12c890ecc6c512e

using UnityEditor;
using UnityEngine;

public sealed class ExampleClass : EditorWindow
{
    private static readonly string[] mList = 
    {
        "AboutWIndowLicenseLabel"                       ,
        "AC LeftArrow"                                  ,
        "AC RightArrow"                                 ,
        "AnimationCurveEditorBackground"                ,
        "AnimationEventBackground"                      ,
        "AnimationEventTooltip"                         ,
        "AnimationEventTooltipArrow"                    ,
        "AnimationKeyframeBackground"                   ,
        "AnimationRowEven"                              ,
        "AnimationRowOdd"                               ,
        "AnimationSelectionTextField"                   ,
        "AnimationTimelineTick"                         ,
        "AnimPropDropdown"                              ,
        "AppToolbar"                                    ,
        "AS TextArea"                                   ,
        "BoldLabel"                                     ,
        "BoldToggle"                                    ,
        "ButtonLeft"                                    ,
        "ButtonMid"                                     ,
        "ButtonRight"                                   ,
        "CN Box"                                        ,
        "CN CountBadge"                                 ,
        "CN EntryBackEven"                              ,
        "CN EntryBackOdd"                               ,
        "CN EntryError"                                 ,
        "CN EntryInfo"                                  ,
        "CN EntryWarn"                                  ,
        "CN Message"                                    ,
        "CN StatusError"                                ,
        "CN StatusInfo"                                 ,
        "CN StatusWarn"                                 ,
        "ColorField"                                    ,
        "ColorPicker2DThumb"                            ,
        "ColorPickerBackground"                         ,
        "ColorPickerBox"                                ,
        "ColorPickerHorizThumb"                         ,
        "ColorPickerVertThumb"                          ,
        "Command"                                       ,
        "CommandLeft"                                   ,
        "CommandMid"                                    ,
        "CommandRight"                                  ,
        "ControlLabel"                                  ,
        "CurveEditorLabelTickmarks"                     ,
        "debug_layout_box"                              ,
        "dockarea"                                      ,
        "dockareaOverlay"                               ,
        "dockareaStandalone"                            ,
        "dragtab"                                       ,
        "dragtabbright"                                 ,
        "dragtabdropwindow"                             ,
        "DropDown"                                      ,
        "DropDownButton"                                ,
        "ErrorLabel"                                    ,
        "ExposablePopupItem"                            ,
        "ExposablePopupMenu"                            ,
        "EyeDropperHorizontalLine"                      ,
        "EyeDropperPickedPixel"                         ,
        "EyeDropperVerticalLine"                        ,
        "flow background"                               ,
        "flow navbar back"                              ,
        "flow navbar button"                            ,
        "flow navbar separator"                         ,
        "flow node 0"                                   ,
        "flow node 0 on"                                ,
        "flow node 1"                                   ,
        "flow node 1 on"                                ,
        "flow node 2"                                   ,
        "flow node 2 on"                                ,
        "flow node 3"                                   ,
        "flow node 3 on"                                ,
        "flow node 4"                                   ,
        "flow node 4 on"                                ,
        "flow node 5"                                   ,
        "flow node 5 on"                                ,
        "flow node 6"                                   ,
        "flow node 6 on"                                ,
        "flow node hex 0"                               ,
        "flow node hex 0 on"                            ,
        "flow node hex 1"                               ,
        "flow node hex 1 on"                            ,
        "flow node hex 2"                               ,
        "flow node hex 2 on"                            ,
        "flow node hex 3"                               ,
        "flow node hex 3 on"                            ,
        "flow node hex 4"                               ,
        "flow node hex 4 on"                            ,
        "flow node hex 5"                               ,
        "flow node hex 5 on"                            ,
        "flow node hex 6"                               ,
        "flow node hex 6 on"                            ,
        "flow node titlebar"                            ,
        "flow overlay area left"                        ,
        "flow overlay area right"                       ,
        "flow overlay box"                              ,
        "flow overlay foldout"                          ,
        "flow overlay header lower left"                ,
        "flow overlay header lower right"               ,
        "flow overlay header upper left"                ,
        "flow overlay header upper right"               ,
        "flow shader in 0"                              ,
        "flow shader in 1"                              ,
        "flow shader in 2"                              ,
        "flow shader in 3"                              ,
        "flow shader in 4"                              ,
        "flow shader in 5"                              ,
        "flow shader node 0"                            ,
        "flow shader node 0 on"                         ,
        "flow shader out 0"                             ,
        "flow shader out 1"                             ,
        "flow shader out 2"                             ,
        "flow shader out 3"                             ,
        "flow shader out 4"                             ,
        "flow shader out 5"                             ,
        "flow target in"                                ,
        "flow triggerPin in"                            ,
        "flow triggerPin out"                           ,
        "flow var 0"                                    ,
        "flow var 0 on"                                 ,
        "flow var 1"                                    ,
        "flow var 1 on"                                 ,
        "flow var 2"                                    ,
        "flow var 2 on"                                 ,
        "flow var 3"                                    ,
        "flow var 3 on"                                 ,
        "flow var 4"                                    ,
        "flow var 4 on"                                 ,
        "flow var 5"                                    ,
        "flow var 5 on"                                 ,
        "flow var 6"                                    ,
        "flow var 6 on"                                 ,
        "flow varPin in"                                ,
        "flow varPin out"                               ,
        "flow varPin tooltip"                           ,
        "Foldout"                                       ,
        "FoldOutPreDrop"                                ,
        "GameViewBackground"                            ,
        "Grad Down Swatch"                              ,
        "Grad Down Swatch Overlay"                      ,
        "Grad Up Swatch"                                ,
        "Grad Up Swatch Overlay"                        ,
        "grey_border"                                   ,
        "GridList"                                      ,
        "GridListText"                                  ,
        "GridToggle"                                    ,
        "GroupBox"                                      ,
        "GUIEditor.BreadcrumbLeft"                      ,
        "GUIEditor.BreadcrumbMid"                       ,
        "GV Gizmo DropDown"                             ,
        "HeaderLabel"                                   ,
        "HelpBox"                                       ,
        "Hi Label"                                      ,
        "HorizontalMinMaxScrollbarThumb"                ,
        "hostview"                                      ,
        "IN BigTitle"                                   ,
        "IN BigTitle Inner"                             ,
        "IN ColorField"                                 ,
        "IN DropDown"                                   ,
        "IN Foldout"                                    ,
        "IN FoldoutStatic"                              ,
        "IN Label"                                      ,
        "IN LockButton"                                 ,
        "IN ObjectField"                                ,
        "IN Popup"                                      ,
        "IN SelectedLine"                               ,
        "IN TextField"                                  ,
        "IN ThumbnailSelection"                         ,
        "IN ThumbnailShadow"                            ,
        "IN Title"                                      ,
        "IN TitleText"                                  ,
        "IN Toggle"                                     ,
        "InnerShadowBg"                                 ,
        "InvisibleButton"                               ,
        "LargeButton"                                   ,
        "LargeButtonLeft"                               ,
        "LargeButtonMid"                                ,
        "LargeButtonRight"                              ,
        "LargeDropDown"                                 ,
        "LargeLabel"                                    ,
        "LargePopup"                                    ,
        "LargeTextField"                                ,
        "LightmapEditorSelectedHighlight"               ,
        "ListToggle"                                    ,
        "LockedHeaderBackground"                        ,
        "LockedHeaderButton"                            ,
        "LockedHeaderLabel"                             ,
        "LODBlackBox"                                   ,
        "LODCameraLine"                                 ,
        "LODLevelNotifyText"                            ,
        "LODRendererAddButton"                          ,
        "LODRendererButton"                             ,
        "LODRendererRemove"                             ,
        "LODRenderersText"                              ,
        "LODSceneText"                                  ,
        "LODSliderBG"                                   ,
        "LODSliderRange"                                ,
        "LODSliderRangeSelected"                        ,
        "LODSliderText"                                 ,
        "LODSliderTextSelected"                         ,
        "MeBlendBackground"                             ,
        "MeBlendPosition"                               ,
        "MeBlendTriangleLeft"                           ,
        "MeBlendTriangleRight"                          ,
        "MeLivePlayBackground"                          ,
        "MeLivePlayBar"                                 ,
        "MeTimeLabel"                                   ,
        "MeTransBGOver"                                 ,
        "MeTransitionBack"                              ,
        "MeTransitionBlock"                             ,
        "MeTransitionHandleLeft"                        ,
        "MeTransitionHandleLeftPrev"                    ,
        "MeTransitionHandleRight"                       ,
        "MeTransitionHead"                              ,
        "MeTransitionSelect"                            ,
        "MeTransitionSelectHead"                        ,
        "MeTransOff2On"                                 ,
        "MeTransOffLeft"                                ,
        "MeTransOffRight"                               ,
        "MeTransOn2Off"                                 ,
        "MeTransOnLeft"                                 ,
        "MeTransOnRight"                                ,
        "MeTransPlayhead"                               ,
        "MiniBoldLabel"                                 ,
        "minibutton"                                    ,
        "minibuttonleft"                                ,
        "minibuttonmid"                                 ,
        "minibuttonright"                               ,
        "MiniLabel"                                     ,
        "MiniLabelRight"                                ,
        "MiniMinMaxSliderHorizontal"                    ,
        "MiniMinMaxSliderVertical"                      ,
        "MiniPopup"                                     ,
        "MiniPullDown"                                  ,
        "MiniPullDownLeft"                              ,
        "MiniTextField"                                 ,
        "MiniToolbarButton"                             ,
        "MiniToolbarButtonLeft"                         ,
        "MiniToolbarPopup"                              ,
        "MinMaxHorizontalSliderThumb"                   ,
        "NotificationBackground"                        ,
        "NotificationText"                              ,
        "ObjectField"                                   ,
        "ObjectFieldThumb"                              ,
        "ObjectFieldThumbOverlay"                       ,
        "ObjectFieldThumbOverlay2"                      ,
        "ObjectPickerBackground"                        ,
        "ObjectPickerGroupHeader"                       ,
        "ObjectPickerLargeStatus"                       ,
        "ObjectPickerPreviewBackground"                 ,
        "ObjectPickerResultsEven"                       ,
        "ObjectPickerResultsGrid"                       ,
        "ObjectPickerResultsGridLabel"                  ,
        "ObjectPickerResultsOdd"                        ,
        "ObjectPickerSmallStatus"                       ,
        "ObjectPickerTab"                               ,
        "ObjectPickerToolbar"                           ,
        "OL box"                                        ,
        "OL box NoExpand"                               ,
        "OL Elem"                                       ,
        "OL EntryBackEven"                              ,
        "OL EntryBackOdd"                               ,
        "OL header"                                     ,
        "OL Label"                                      ,
        "OL Minus"                                      ,
        "OL Plus"                                       ,
        "OL TextField"                                  ,
        "OL Title"                                      ,
        "OL Title TextRight"                            ,
        "OL Titleleft"                                  ,
        "OL Titlemid"                                   ,
        "OL Titleright"                                 ,
        "OL Toggle"                                     ,
        "OL ToggleWhite"                                ,
        "PaneOptions"                                   ,
        "PlayerSettingsLevel"                           ,
        "PlayerSettingsPlatform"                        ,
        "Popup"                                         ,
        "PopupBackground"                               ,
        "PopupCurveDropdown"                            ,
        "PopupCurveEditorBackground"                    ,
        "PopupCurveEditorSwatch"                        ,
        "PopupCurveSwatchBackground"                    ,
        "PR DigDownArrow"                               ,
        "PR Insertion"                                  ,
        "PR Label"                                      ,
        "PR Ping"                                       ,
        "PR TextField"                                  ,
        "PreBackground"                                 ,
        "PreButton"                                     ,
        "PreferencesKeysElement"                        ,
        "PreferencesSection"                            ,
        "PreferencesSectionBox"                         ,
        "PreHorizontalScrollbar"                        ,
        "PreHorizontalScrollbarThumb"                   ,
        "PreLabel"                                      ,
        "PreOverlayLabel"                               ,
        "PreSlider"                                     ,
        "PreSliderThumb"                                ,
        "PreToolbar"                                    ,
        "PreToolbar2"                                   ,
        "PreVerticalScrollbar"                          ,
        "PreVerticalScrollbarThumb"                     ,
        "ProfilerBadge"                                 ,
        "ProfilerLeftPane"                              ,
        "ProfilerLeftPaneOverlay"                       ,
        "ProfilerPaneLeftBackground"                    ,
        "ProfilerPaneSubLabel"                          ,
        "ProfilerRightPane"                             ,
        "ProfilerScrollviewBackground"                  ,
        "ProfilerSelectedLabel"                         ,
        "ProgressBarBack"                               ,
        "ProgressBarBar"                                ,
        "ProgressBarText"                               ,
        "ProjectBrowserBottomBarBg"                     ,
        "ProjectBrowserGridLabel"                       ,
        "ProjectBrowserHeaderBgMiddle"                  ,
        "ProjectBrowserHeaderBgTop"                     ,
        "ProjectBrowserIconAreaBg"                      ,
        "ProjectBrowserIconDropShadow"                  ,
        "ProjectBrowserPreviewBg"                       ,
        "ProjectBrowserSubAssetBg"                      ,
        "ProjectBrowserSubAssetBgCloseEnded"            ,
        "ProjectBrowserSubAssetBgDivider"               ,
        "ProjectBrowserSubAssetBgMiddle"                ,
        "ProjectBrowserSubAssetBgOpenEnded"             ,
        "ProjectBrowserSubAssetExpandBtn"               ,
        "ProjectBrowserTopBarBg"                        ,
        "QualitySettingsDefault"                        ,
        "Radio"                                         ,
        "RightLabel"                                    ,
        "RL Background"                                 ,
        "RL DragHandle"                                 ,
        "RL Element"                                    ,
        "RL Footer"                                     ,
        "RL FooterButton"                               ,
        "RL Header"                                     ,
        "SC ViewAxisLabel"                              ,
        "SC ViewLabel"                                  ,
        "SceneViewOverlayTransparentBackground"         ,
        "ScriptText"                                    ,
        "SearchCancelButton"                            ,
        "SearchCancelButtonEmpty"                       ,
        "SearchModeFilter"                              ,
        "SearchTextField"                               ,
        "SelectionRect"                                 ,
        "ServerChangeCount"                             ,
        "ServerUpdateChangeset"                         ,
        "ServerUpdateChangesetOn"                       ,
        "ServerUpdateInfo"                              ,
        "ServerUpdateLog"                               ,
        "ShurikenCheckMark"                             ,
        "ShurikenEffectBg"                              ,
        "ShurikenEmitterTitle"                          ,
        "ShurikenLabel"                                 ,
        "ShurikenLine"                                  ,
        "ShurikenMinus"                                 ,
        "ShurikenModuleBg"                              ,
        "ShurikenModuleTitle"                           ,
        "ShurikenObjectField"                           ,
        "ShurikenPlus"                                  ,
        "ShurikenPopUp"                                 ,
        "ShurikenToggle"                                ,
        "ShurikenValue"                                 ,
        "SimplePopup"                                   ,
        "SliderMixed"                                   ,
        "StaticDropdown"                                ,
        "sv_iconselector_back"                          ,
        "sv_iconselector_button"                        ,
        "sv_iconselector_labelselection"                ,
        "sv_iconselector_selection"                     ,
        "sv_iconselector_sep"                           ,
        "sv_label_0"                                    ,
        "sv_label_1"                                    ,
        "sv_label_2"                                    ,
        "sv_label_3"                                    ,
        "sv_label_4"                                    ,
        "sv_label_5"                                    ,
        "sv_label_6"                                    ,
        "sv_label_7"                                    ,
        "TabWindowBackground"                           ,
        "Tag MenuItem"                                  ,
        "Tag TextField"                                 ,
        "Tag TextField Button"                          ,
        "Tag TextField Empty"                           ,
        "TE NodeBackground"                             ,
        "TE NodeBox"                                    ,
        "TE NodeBoxSelected"                            ,
        "TE NodeLabelBot"                               ,
        "TE NodeLabelTop"                               ,
        "TE PinLabel"                                   ,
        "TE Toolbar"                                    ,
        "TE toolbarbutton"                              ,
        "TE ToolbarDropDown"                            ,
        "TimeScrubber"                                  ,
        "TimeScrubberButton"                            ,
        "TL BaseStateLogicBarOverlay"                   ,
        "TL EndPoint"                                   ,
        "TL InPoint"                                    ,
        "TL ItemTitle"                                  ,
        "TL LeftColumn"                                 ,
        "TL LeftItem"                                   ,
        "TL LogicBar 0"                                 ,
        "TL LogicBar 1"                                 ,
        "TL LogicBar parentgrey"                        ,
        "TL LoopSection"                                ,
        "TL OutPoint"                                   ,
        "TL Playhead"                                   ,
        "TL Range Overlay"                              ,
        "TL RightLine"                                  ,
        "TL Selection H1"                               ,
        "TL Selection H2"                               ,
        "TL SelectionBarCloseButton"                    ,
        "TL SelectionBarPreview"                        ,
        "TL SelectionBarText"                           ,
        "TL SelectionButton"                            ,
        "TL SelectionButton PreDropGlow"                ,
        "TL SelectionButtonName"                        ,
        "TL SelectionButtonNew"                         ,
        "TL tab left"                                   ,
        "TL tab mid"                                    ,
        "TL tab plus left"                              ,
        "TL tab plus right"                             ,
        "TL tab right"                                  ,
        "ToggleMixed"                                   ,
        "Toolbar"                                       ,
        "toolbarbutton"                                 ,
        "ToolbarDropDown"                               ,
        "ToolbarPopup"                                  ,
        "ToolbarSeachCancelButton"                      ,
        "ToolbarSeachCancelButtonEmpty"                 ,
        "ToolbarSeachTextField"                         ,
        "ToolbarSeachTextFieldPopup"                    ,
        "ToolbarSearchField"                            ,
        "ToolbarTextField"                              ,
        "Tooltip"                                       ,
        "U2D.createRect"                                ,
        "U2D.dragDot"                                   ,
        "U2D.dragDotDimmed"                             ,
        "VCS_StickyNote"                                ,
        "VCS_StickyNoteArrow"                           ,
        "VCS_StickyNoteLabel"                           ,
        "VCS_StickyNoteP4"                              ,
        "VerticalMinMaxScrollbarThumb"                  ,
        "VisibilityToggle"                              ,
        "WhiteBoldLabel"                                ,
        "WhiteLabel"                                    ,
        "WhiteLargeLabel"                               ,
        "WhiteMiniLabel"                                ,
        "WinBtnCloseActiveMac"                          ,
        "WinBtnCloseMac"                                ,
        "WinBtnCloseWin"                                ,
        "WinBtnInactiveMac"                             ,
        "WinBtnMaxActiveMac"                            ,
        "WinBtnMaxMac"                                  ,
        "WinBtnMaxWin"                                  ,
        "WinBtnMinActiveMac"                            ,
        "WinBtnMinMac"                                  ,
        "WinBtnMinWin"                                  ,
        "WindowBackground"                              ,
        "WindowBottomResize"                            ,
        "WindowResizeMac"                               ,
        "Wizard Box"                                    ,
        "Wizard Error"                                  ,
        "WordWrapLabel"                                 ,
        "WordWrappedLabel"                              ,
        "WordWrappedMiniLabel"                          ,
        "WrappedLabel"                                  ,
    };
    
    private Vector2 mScrollPos;

    [MenuItem( "Tools/Example" )]
    private static void Example()
    {
        GetWindow<ExampleClass>( true );
    }
    
    private void OnGUI()
    {
        mScrollPos = EditorGUILayout.BeginScrollView( mScrollPos );
        foreach ( var n in mList )
        {
            EditorGUILayout.BeginHorizontal( GUILayout.Height( 48 ) );
            EditorGUILayout.SelectableLabel( n );
            EditorGUILayout.Toggle( false, n );
            EditorGUILayout.EndHorizontal();
            GUILayout.Box( 
                string.Empty,
                GUILayout.Width( position.width - 24 ), 
                GUILayout.Height( 1 ) 
            );
        }
        EditorGUILayout.EndScrollView();
    }
}

标签:node,OL,flow,builtin,shader,Unity,var,GUIStyle,TL
From: https://www.cnblogs.com/dewxin/p/17871010.html

相关文章

  • Unity学习笔记--数据持久化XML文件(2)
    IXmlSerializable接口:使用该接口可以帮助处理不能被序列化和反序列化的特殊类得到处理,使特殊类继承IXmlSerializable接口,实现其中的读写方法,检测到读写方法被重写之后,便会按照自定义实现的接口来实现方法。usingSystem;usingSystem.IO;usingSystem.Runtime.InteropServi......
  • 如何拆解Unity 2022.3版本的AssetBundle
    1)如何拆解Unity2022.3版本的AssetBundle2)Unity2022LTS版本的稳定性3)关于AssetBundle禁用TypeTree之后的一些可序列化的问题这是第363篇UWA技术知识分享的推送,精选了UWA社区的热门话题,涵盖了UWA问答、社区帖子等技术知识点,助力大家更全面地掌握和学习。UWA社区主页:community.......
  • Unity2D中瓦片地图的创建与绘制教程
    Unity2D中瓦片地图的创建与绘制素材切割创建地图创建瓦片绘制地图瓦片调色板画笔拓展素材资源链接素材切割选中以下素材,以Tiles为例(素材链接在文章最下方)修改素材属性。将SpriteMode属性改为Multiple多张(不然切割不了);PixelsPerUnit改为16像素;FilterMode改为Point(nofilte......
  • Unity3D角色移动控制脚本
    Unity3D角色移动控制脚本键盘控制方向鼠标控制方向键盘控制方向privateCharacterControllercontroller;publicfloatSpeed=1f;publicfloatRotateSpeed=1f;voidStart(){ controller=transform.GetComponent<CharacterController>();}voidUpdate(){ //键盘......
  • 普通unity项目升级URP管线渲染项目教程
    普通unity项目升级URP管线渲染安装URP插件创建URP渲染管线配置渲染管线升级素材的渲染管线方式一方式二资源链接安装URP插件点击Window选择PackageManager在出现的窗口左上角选择UnityRegistry搜索关键字Universal在出现的UniversalRP插件中下面点击Install创建URP渲染管线安......
  • 使用Unity Localization插件进行项目本地化实战详解
    在使用Unity开发游戏的过程中,本地化是必不可少的。网络上也有很多的本地化工具,本次我介绍的是Unity官方提供的Localization插件,大家可以在PackageManager进行安装 一、语言配置,本地化表创建在ProjectSetting中找到Localization,(需要先创建这个LocalizationSetting文件)点击L......
  • 在Unity中模块化管理自定义功能和资源
    之前在做Unity项目时,有时会遇到多个项目共用同一部分代码或资源的情况。而当被共用的部分需要更新的时候,手动复制替换非常麻烦,并且可能会有遗漏。对于这个问题,一个很好的解决办法是将可复用的文件打包为自定义包(CustomPackage),使用git等版本控制工具来管理每个包的内容。什么是Pa......
  • Unity DOTS系列之Filter Baking Output与Prefab In Baking核心分析
    最近DOTS发布了正式的版本,我们来分享一下DOTS里面Baking核心机制,方便大家上手学习掌握UnityDOTS开发。今天给大家分享的Baking机制中的FilterBakingOutput与PrefabInBaking。对啦!这里有个游戏开发交流小组里面聚集了一帮热爱学习游戏的零基础小白,也有一些正在从事游戏开发......
  • Unity DOTS Baking System与Baking World
    最近DOTS终于发布了正式的版本,我们来分享一下DOTS里面Baking阶段,BakingSystem,BakingWorld的关键概念,方便大家上手学习掌握UnityDOTS开发。Unity在Baking也是基于ECS模式开发设计的,所以Baking的时候也会有BakingSystem与BakingWorld,把Baking出来的数据放到BakingWorld里面......
  • Unity DOTS System与SystemGroup概述
    最近DOTS终于发布了正式的版本,我们来分享以下DOTS里面System关键概念,方便大家上手学习掌握UnityDOTS开发。System是迭代计算与处理World中的Entity实体的ComponentData数据的逻辑代码。System对应的代码是运行在mainthread上的。World里面所有的System通过SystemGroup来进行......