Class ResourcesProvider
Inheritance
Namespace: GDX.Editor
Syntax
public static class ResourcesProvider
Fields
| Improve this Doc View SourceChangedClass
Declaration
public const string ChangedClass = "changed"
Field Value
Type | Description |
---|---|
System.String |
DisabledClass
Declaration
public const string DisabledClass = "disabled"
Field Value
Type | Description |
---|---|
System.String |
EnabledClass
Declaration
public const string EnabledClass = "enabled"
Field Value
Type | Description |
---|---|
System.String |
ExpandedClass
Declaration
public const string ExpandedClass = "expanded"
Field Value
Type | Description |
---|---|
System.String |
HiddenClass
Declaration
public const string HiddenClass = "hidden"
Field Value
Type | Description |
---|---|
System.String |
SearchClass
Declaration
public const string SearchClass = "search"
Field Value
Type | Description |
---|---|
System.String |
SearchHighlightClass
Declaration
public const string SearchHighlightClass = "search-item"
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceCheckTheme(VisualElement)
Apply light/dark mode classes.
Declaration
public static void CheckTheme(VisualElement element)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.UIElements.VisualElement | element | The target element to have classes applied to. |
GetBanner()
Returns an instance of the GDX logo banner image.
Declaration
public static Texture2D GetBanner()
Returns
Type | Description |
---|---|
UnityEngine.Texture2D | An image loaded from disk, if not cached. |
GetDataTableIcon()
Returns an instance of the DataTable icon.
Declaration
public static Texture2D GetDataTableIcon()
Returns
Type | Description |
---|---|
UnityEngine.Texture2D | An image loaded from disk, if not cached. |
GetLogo()
Returns an instance of the dotBunny logo image.
Declaration
public static Texture2D GetLogo()
Returns
Type | Description |
---|---|
UnityEngine.Texture2D | An image loaded from disk, if not cached. |
GetSharedStylesheet()
Return the global stylesheet.
Declaration
public static StyleSheet GetSharedStylesheet()
Returns
Type | Description |
---|---|
UnityEngine.UIElements.StyleSheet | The stylesheet if found, or null. |
Remarks
This will find and cache the stylesheet reference for future use, using the first asset to match the query.
GetStylesheet(String)
Declaration
public static StyleSheet GetStylesheet(string targetName)
Parameters
Type | Name | Description |
---|---|---|
System.String | targetName |
Returns
Type | Description |
---|---|
UnityEngine.UIElements.StyleSheet |
GetStyleSheetOverride()
Return the override stylesheet.
Declaration
public static StyleSheet GetStyleSheetOverride()
Returns
Type | Description |
---|---|
UnityEngine.UIElements.StyleSheet | The stylesheet if found, or null. |
Remarks
This will find and cache the stylesheet reference for future use, using the first asset to match the query.
SetupSharedStylesheets(VisualElement)
Sets up the initial stylesheets for a UnityEngine.UIElements.VisualElement.
Declaration
public static void SetupSharedStylesheets(VisualElement rootElement)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.UIElements.VisualElement | rootElement | The target UnityEngine.UIElements.VisualElement to have the stylesheets applied to. |
SetupStylesheet(String, VisualElement)
Add the target stylesheet to the provided rootElement
.
Declaration
public static void SetupStylesheet(string targetName, VisualElement rootElement)
Parameters
Type | Name | Description |
---|---|---|
System.String | targetName | The name of the stylesheet found in the package. |
UnityEngine.UIElements.VisualElement | rootElement | The element to apply the stylesheet to. |