Back to API Reference
Class

UniTextSettings

sealed

Global settings ScriptableObject for UniText configuration.

Remarks

Access via Edit → Project Settings → UniText. Contains editor-only default configurations for new UniText components.
public static UniTextGradients Gradients{ get; set }

Gets or sets the named gradients asset.

public static StylePreset GlobalStylePreset{ get; set }

Project-wide StylePreset applied to every UniTextBase component without per-component opt-in. Behaves as one extra entry appended after each component's local StylePresets list, so local Styles and per-component StylePresets register first and win parse-rule conflicts.

public static UniTextSettings Instance{ get }

Gets the singleton settings instance, loading from Resources if needed.

public static StyledList<WordSegmentationDictionary> Dictionaries{ get }

Gets the configured word segmentation dictionaries.

public static string Language{ get; set }

Gets or sets the project-wide BCP 47 language tag. Applied to any codepoint that has no component-level UniText.Language and no per-range <lang> override.

public static int WorldBatcherShardTargetVertexCount{ get; set }

Target vertex capacity per shard in UniTextWorldBatcher. Groups of UniTextWorld components that exceed this threshold are split into multiple shards so that structural rebuilds of one shard do not touch the others.

public static bool Affects()

Returns when a Changed event with payload changedProperty should trigger a reaction subscribed to interestedField — either exact name match, or the All sentinel. Canonical filter for every Changed consumer.

public static void SetInstance(UniTextSettings settings)

Manually replaces the singleton settings asset (used by tests and custom initialization paths). Raises Changed with the All sentinel — every reactive field is potentially different now, so subscribers should re-bind everything.

public static const string All

Sentinel passed to Changed when the whole settings asset has been swapped (see SetInstance) and every field is potentially different from its previously observed value. Affects treats this as "matches every interested field" so consumers don't need to special-case it.

public static Action<string> Changed

Raised when a settings field is mutated. The argument is the property name (nameof(...)) of the field that changed, allowing subscribers to filter reactions surgically without per-component snapshot bookkeeping. The sentinel All means "the entire asset was replaced, re-read everything" and is fired by SetInstance. Inspector OnValidate fires one event per reactive field whose value differs from the last observed snapshot.