UiStyleSheetAsset
- Namespace: Turian.Engine.UI
- Source File: UiStyleSheetAsset.cs
Asset metadata for a .uss stylesheet. GetContent reads the artifact the importer validated and parses it into a Guinevere StyleSheet, cached per asset id.
Public Methods
GetContent
public StyleSheet? GetContent()
Reads this stylesheet's artifact and returns the parsed StyleSheet, or null when the artifact is missing or unreadable. The result is cached.
Returns: StyleSheet?
InvalidateCacheEntry
public static void InvalidateCacheEntry(Guid assetId)
Drops the cached stylesheet for assetId.
Parameters:
assetId(Guid): The stylesheet asset id.
ClearCache
public static void ClearCache()
Clears every cached stylesheet. Call on project unload.
LoadContent
public static StyleSheet LoadContent(string absolutePath)
Loads and parses a .uss file directly from disk. Used by tooling and tests.
Parameters:
absolutePath(string): Absolute path of the.ussfile.
Returns: StyleSheet