TextAsset 文本资源
Inherits from Object
Text file assets.
文本文件资源。
You can use raw .txt files in your project as assets and get their contents through this class.
在你的工程里,你可以使用原始的.txt文件作为资源并且通过该类获取它们的内容。
Variables变量
- textThe text contents of the .txt file as a string. (Read Only)
.txt文件的文本内容作为字符串。(只读) - bytesThe raw bytes of the text asset. (Read Only)
文本资源的原始字节。(只读)
Inherited members继承成员Inherited Variables继承变量
- nameThe name of the object. //物体的名字
- hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions继承函数
- GetInstanceIDReturns the instance id of the object.
返回物体的实例ID - ToStringReturns the name of the game object.
返回游戏物体的名称。
Inherited Class Functions继承类函数
- DestroyRemoves a gameobject, component or asset.
删除一个游戏物体、组件或资源 - DestroyImmediateDestroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。 - DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。 - FindObjectOfTypeReturns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。 - FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表 - InstantiateClones the object original and returns the clone.
克隆原始物体,并返回克隆的物体