Textures Setup
Last updated
Last updated
In order to get the effects looking as they should, it's important to know how to import and set up the textures we’ll be using for our sprites and UI images.
Here you have a link to a video that explains how to setup your textures in case you prefer a visual explanation:
The most important part is having enough room within the sprite shape to show the effects. In the top of the Scene window you can choose how the scene view is rendered. If we change from Shaded to ShadedWireframe we’ll be able to see the sprite rect size:
In the Shaded Wireframe view we can see black lines, that’s the shape of the mesh where your sprite and effects will be rendered. To get all the effects to display properly we’ll need more space. Otherwise the effects will get cropped where the black line ends.
The easiest way of doing so is changing the Mesh Type to Full Rect in the import settings of the sprite:
We should always have plenty of space around the sprite so that all the effects can get rendered properly like in this picture (red lines show all the available space where effects can get rendered):
Moreover, if you need even more space you could use the Rect Size effect. This effect will make the available space for the sprite even bigger. Note that this effect will only properly work on single image sprites, it won’t work on spritesheets. And doesn’t work well for UI Images either, please use this effect as a last resort.
In a similar fashion if we are using a spritesheet you must import the sprites in Multiple Sprite Mode (as you always do) and then make sure that when you Slice your sprites they have some spacing:
Notice how sprites have a generous spacing between them. Be aware that some effects won’t display correctly unless you set up your atlas sprites properly, see next section to know how (Sprite Atlases).
You’ll see that some effects have a Glow property. In order for these properties to have the desired effect you need to add Post Processing and Bloom to the Main Camera of your scene. If you don’t know how this is done you can follow these videos: URP: https://youtu.be/ZJBw7sGG63g Built-in: https://youtu.be/pq5dTygcFVU
Most of the time it will be a good idea to set the Wrap Mode of the Import Settings of the textures you use to Repeat. This will assure a proper result when using effects that use scrolling textures
The same exact process applies to UI images