StringTableAsset

Asset metadata for a .strings localization table. The imported runtime form is JSON — StringTableJson — regardless of whether the source was authored directly in JSON or exported from XLIFF/CSV. GetContent reads it through the asset provider, like Turian.Engine.UI.Assets.UiDocumentAsset, so it works for loose editors and packed builds alike.

Public Methods

GetContent

public StringTable? GetContent()

Reads this table and returns the parsed StringTable, or null when the artifact is missing or unreadable. The result is cached — callers must not mutate it.

Returns: StringTable?

InvalidateCacheEntry

public static void InvalidateCacheEntry(Guid assetId)

Drops the cached table for assetId, forcing a reload on next access.

Parameters:

  • assetId (Guid): The string table asset id.

ClearCache

public static void ClearCache()

Clears every cached table. Call on project unload.

LoadContent

public static StringTable LoadContent(string absolutePath)

Loads a .strings file directly from disk, bypassing the asset database.

Parameters:

  • absolutePath (string): Absolute path of the .strings file.

Returns: StringTable

  • The parsed table.