Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

GUIStyle.contentOffset

Switch to Manual
public Vector2 contentOffset;

Description

Pixel offset to apply to the content of this GUIstyle.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { Debug.Log(GUI.skin.button.contentOffset); } }