Sprite Renderers
The sprite renderer component is one of the basic building blocks of All Out letting you render textures in the game world.
Advanced Asset Settings
Some additional settings are available by creating a .asset_settings
file in your /res
directory. All of the "ids" in asset settings are the path to the asset relative to the res folder.
Tiling Support
- Add the following to your .asset_settings and tweak the pixels_per_unit to your liking.
- Select "wrap" in the editor sprite_renderer component settings and increase the scale to tile
[
{
"id": "chair.png",
"texture": {
"wrap_repeat": true,
"pixels_per_unit": 300
}
}
]
Alternative Sampling/Filter Modes (Pixel Art) By default All Out will smooth textures using bilinear filtering. This doesn't look so good when using pixel art, so you can change to nearest filtering for these assets.
[
{
"id": "food_items/apple.png",
"texture": { "filter": "FILTER_NEAREST" }
}
]
Nine Slicing (UI buttons, dialogs, etc...) Nine-slicing lets you stretch a texture without distorting it for different sized UIs etc... Slice values are left, bottom, right, top
[
{
"id": "guipro/Common/button_red.png",
"texture": { "slice_scale": 1, "slice": [ 25, 40, 25, 25 ] }
},
]