Version: 2022.3
言語: 日本語

TextAsset

class in UnityEngine

/

継承:Object

マニュアルに切り替える

説明

Represents a raw text or binary file asset.

You can use raw text files in your project as assets and get their contents through this class. For more information, see text.

You can access the file as a raw byte array to access data from binary files. For more information on how to access data from binary files, see bytes and GetData.

For more information about importing text or binary files into your project as Text Assets, see Text Asset.

変数

bytesテキストアセットの byte 配列(読み取り専用)
dataSizeThe size of the text asset data in bytes. (Read Only)
textThe text contents of the file as a string. (Read Only)

コンストラクタ

TextAssetCreate a new TextAsset with the specified text contents.This constructor creates a TextAsset, which is not the same as a plain text file. When saved to disk using the AssetDatabase class, the TextAsset should be saved with the .asset extension.

Public 関数

GetDataGets raw text asset data.
ToStringReturns the contents of the TextAsset.

継承メンバー

変数

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

GetInstanceIDGets the instance ID of the object.

Static 関数

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。