Here we have simple texture that is set to Sprite mode.
Below built-in sprite import settings you can see Generate SDF toggle, its enabled - meaning SDF is imported for this texture.
Open scene, there is singular SDFImage
with sprite we’ve seen earlier, it is referenced in SDFImage
****component. Try toggling “Generate SDF” in texture import settings.
Notice how sprite at SDFImage
in scene disappearing and appearing again.
<aside> 💡 This toggle is the simplest way to import SDF Texture.
</aside>
Version 1.2x introduced decoupled pipeline, this is new way to import SDF sprites.
<aside> 💡 You can find more in dedicated page Starting Decoupled Pipeline
</aside>
SDFImage
can be created as any other UI component - trough context menu
Now drag&drop star.png to newly created SDFImage
In console you will see message that star.png don’t have sdf generated, therefore it was generated automatically.
Go to the star.png and see that Generate SDF changed its state. Here you can adjust SDF settings.
Now if you want to browse other SDF sprites in SDFImage you can open ObjectPicker.
Note that sometimes it takes time for unity QuickSearch module (used here) to search data and build search indexes, also texture RMB→Reimport might help to display sprite here.
<aside> 👏 Congrats on creating first working SDF Image setup!
</aside>