GUILayout.TextAreastatic function TextArea (text : String, params options : GUILayoutOption[]) : Stringstatic function TextArea (text : String, maxLength : int, params options : GUILayoutOption[]) : Stringstatic function TextArea (text : String, style : GUIStyle, params options : GUILayoutOption[]) : Stringstatic function TextArea (text : String, maxLength : int, style : GUIStyle, params options : GUILayoutOption[]) : StringParameters
ReturnsString - the edited string. DescriptionMake a multi-line text field where the user can edit a string.
JavaScripts
var stringToEdit : String = "Hello World\nI've got 2 lines...";
function OnGUI () { // Make a multiline text area that modifies stringToEdit. stringToEdit = GUILayout.TextArea (stringToEdit, 200); } using UnityEngine;
using System.Collections; public class example : MonoBehaviour { public string stringToEdit = "Hello World\nI've got 2 lines..."; void OnGUI() { stringToEdit = GUILayout.TextArea(stringToEdit, 200); } } import UnityEngine
import System.Collections class example(MonoBehaviour): public stringToEdit as string = 'Hello World\nI\'ve got 2 lines...' def OnGUI(): stringToEdit = GUILayout.TextArea(stringToEdit, 200)
|

