LanguageEnglish
  • C#
  • JS

Script language

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

This version of Unity is unsupported.

GUISkin.textField

Switch to Manual
public GUIStyle textField;

Description

Style used by default for GUI.TextField controls.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public GUIStyle style; private string str = "A string..."; void OnGUI() { GUI.skin.textField = style; str = GUILayout.TextField(str); } }