Class ColorSwatchCollectionAsset
ScriptableObject wrapper for a ColorSwatchCollectionData, enabling the Chroma Swatches Library to be persisted as a project asset that can be committed to source control and shared across machines.
Inherited Members
Namespace: Scylla.Core.Util.Palette
Assembly: ScyllaCore.dll
Syntax
public sealed class ColorSwatchCollectionAsset : ScriptableObject
Remarks
Asset workflow. The Chroma editor auto-creates the
singleton swatch-collection asset under the Color Directory the first
time it is opened, so users never need to invoke a Create-asset menu
manually. There is no Assets > Create menu entry intentionally -
a project-wide Chroma Swatches collection is meant to be a singleton.
Runtime access. Use the Collection property to get the immutable ColorSwatchCollection. The conversion is performed once and cached; the cache is invalidated when the asset is modified in the Inspector.
Properties
Collection
Gets the immutable ColorSwatchCollection representation
of this asset. Lazily built from the serialized data on first access
and cached. Returns null if the asset data is invalid.
Declaration
public ColorSwatchCollection Collection { get; }
Property Value
| Type | Description |
|---|---|
| ColorSwatchCollection |
Data
Gets or sets the raw serialized collection data. Setting this value invalidates the cached Collection.
Declaration
public ColorSwatchCollectionData Data { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorSwatchCollectionData |