Scene view with empty SDFImage, you will be changing its sprite throughout sample
Resources loading section for both regular and decoupled pipeline
Sprites for direct loading
Shows how to set sprite to SDFImage as serialized field, there is a few kinds though.
Editor view of loading options
SDFSpriteReference
Most simple sprite setting way.
Field
Setting
This how you change sprites at runtime, by settings struct SDFSpriteReference
to corresponding property.
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.
SDFSpriteMetadataAsset
SDFSpriteMetadataAsset
was previously internal, but now is exposed to public, therefore you can use it directly as object field.
Field
Setting