This category contains files that replace 2D images in the game. For example, the icon when you get a kill or the logo on the main menu.
This category uses JSON files. JSON files are used to set additional information which can't be specified in the file itself. To use a JSON file, make a new file of file type .json with the same name as the file you are setting information for. For example, if you're setting custom information for the file rifle.png, you would make a new file named rifle.json. Inside the JSON file, you can set variables which will affect how the file is affected in-game. Each file page has an example of the default JSON it uses, so you can see which variables you can modify. Additionally, the table below shows all modifiable JSON variables for this category.
Name | Description |
---|---|
border | Only applies to Sliced images. Click here to see Unity's documentation on the topic. In short, this is an array of 4 numbers which denote the border of the image so that it can be resized without stretching. |
borderWidth | A number that sets the thickness of the border on Sliced images, and changes the tile size on Tiled images. |
fillMethod | If this image is filled (like the healthbar), then this value sets the type of fill used. |
fillOrigin | A number between 0 - 4. Determines where the fill originates from. This depends on the fill method, so you'll just have to mess around until you find the right number. |
fillClockwise | true/false. If the fill method is circular, this determines if it should fill clockwise (true) or counterclockwise (false). |
color | A hex color. The tint of the image. Set this to white (#FFFFFF) if you just want to use the color from the texture. |
type | The type of image. This mostly affects how the image scales. Simple images stretch when scaled. Sliced images scale using the border and borderWidth values. Tiled images use repeating textures, and the tiling size is affected by borderWidth. If you have a sliced image, then only the center portion will tile.. You shouldn't set something to be a Filled image if it's not Filled by default, since nothing will happen. |
filterMode | Change the way the texture upscales to higher resolutions. Point will not attempt smoothing (good for pixel art). Bilinear will take 4 sample points and blend them together. |
wrapMode | Change the way the texture tiles. Repeat tiles the texture, creating a repeating patter. Clamp clamps the texture to the last pixel at the edge. Mirror tiles the texture, creating a repeating pattern by mirroring it. MirrorOnce mirrors the texture once before clamping the edge pixels. |