padding
Space from the edge of GUIStyle to the start of the contents.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.IMGUIModule
public RectOffset padding { get; set; }
Examples
using UnityEngine;public class Example : MonoBehaviour{ // Prints the left, right, top and down values of the GUIStyle overflow RectOffset rctOff; void OnGUI() { rctOff = GUI.skin.button.padding; Debug.Log("Left: " + rctOff.left + " Right: " + rctOff.right); Debug.Log("Top: " + rctOff.top + " Bottom: " + rctOff.bottom); }}