Version: 2020.3

GUIStyle.contentOffset

切换到手册
public Vector2 contentOffset ;

描述

要应用于该 GUIstyle 的内容的像素偏移。

using UnityEngine;

public class Example : MonoBehaviour { // Prints the value of contentOffset.

void OnGUI() { Debug.Log(GUI.skin.button.contentOffset); } }