Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

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

TextAsset.text

Switch to Manual
public string text;

Description

The text contents of the .txt file as a string. (Read Only)

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public TextAsset asset; void Start() { print(asset.text); } }