Sample files overview

Scene view with empty SDFImage, you will be changing its sprite throughout sample

Scene view with empty SDFImage, you will be changing its sprite throughout sample

Resources loading section for both regular and decoupled pipeline

Resources loading section for both regular and decoupled pipeline

Sprites for direct loading

Sprites for direct loading

Direct loading

Shows how to set sprite to SDFImage as serialized field, there is a few kinds though.

Editor view of loading options

Editor view of loading options

Set SDFSpriteReference

Most simple sprite setting way.

Field

Field

Setting

Setting

This how you change sprites at runtime, by settings struct SDFSpriteReference to corresponding property.

Docs with detailed explanation on why this struct exist

Docs with detailed explanation on why this struct exist

SDFSpriteReference is exist for multi-version compatibility, in versions before 1.2.x it was holding more properties, and handled some custom serialization, but right now its just an wrapper around SDFSpriteMetadataAsset.

It will be kept in future versions as its useful to have some intermediate serialization layer, instead of plain object reference.

Set SDFSpriteMetadataAsset

SDFSpriteMetadataAsset was previously internal, but now is exposed to public, therefore you can use it directly as object field.

Field

Field

Setting

Setting