This category contains files that change the position, scale, rotation, and other properties of UI elements. For example, the location of the healthbar on the screen.
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 |
---|---|
rotation | The rotation of the UI element. |
scale | A 2D vector. Sets the scaling of the UI element on the x and y axis. |
anchorMin | A 2D vector, with values between 0.0 - 1.0. Sets the position that the lower left corner of the UI element is anchored to. Read more here. |
anchorMax | A 2D vector, with values between 0.0 - 1.0. Sets the position that the upper right corner of the UI element is anchored to. Read more here. |
pivot | A 2D vector, with values between 0.0 - 1.0 (0 being the left/bottom and 1 being the right/top). This sets the point that the element will rotate/scale around. |
anchoredPosition | A 2D vector, with x values between 0.0 - 1920.0 and y values between 0.0 - 1080.0. The game's UI is on a canvas with a virtual scale of 1920x1080, resized to different monitor resolutions. This is the position that the UI element will have relative to the anchors. |
sizeDelta | A 2D vector. This is similar to scale, but instead of stretching the UI element it will expand its bounding box. For example, you might want a text UI element to have more room but not necessarily stretch out the text. If the anchors have been set to the corners of the screen, then this value represents how much bigger or smaller this UI element is relative to the screen. |