Version: 2022.3
言語: 日本語

DownloadHandlerTexture

class in UnityEngine.Networking

/

継承:Networking.DownloadHandler

マニュアルに切り替える

説明

DownloadHandler サブクラスは Texture オブジェクトとして使用する画像のダウンロードに特化されています。

DownloadHandlerTexture は事前に割り当てられた Unity Texture オブジェクトで受信したデータを格納します。 Web サーバーから画像をダウンロードするために最適化されており、画像解凍とワーカースレッド上で復号化を実行します。

HTTP 経由でイメージをダウンロードし、 Unity 内の Texture として使用したい場合はこのクラスの使用を強くお勧めします。

変数

textureダウンロードした Texture か null を返します。(Read Only)

コンストラクタ

DownloadHandlerTextureデフォルトコンストラクター

Static 関数

GetContentダウンロードした Texture か null を返します。

継承メンバー

変数

dataリモートサーバーからダウンロードした実際のバイト数や null を返します。(読み取り専用)
errorError message describing a failure that occurred inside the download handler.
isDoneこの DownloadHandler がすべてのデータを受信したことと、この DownloadHandler が必要なダウンロード後の処理を完了したことを親の [UnityWebRequest] によって知らされた場合、true を返します。
nativeDataProvides direct access to downloaded data.
text便利なプロパティーです。UTF8 ストリングとしてインタープリタされた data からバイトを返します。(読み取り専用)

Public 関数

DisposeSignals that this DownloadHandler is no longer being used, and should clean up any resources it is using.

Protected 関数

CompleteContentリモートサーバーからすべてのデータを受信したとき呼び出されるコールバック
GetDatadata プロパティーがアクセスされたときに呼び出されるコールバック
GetNativeDataProvides allocation-free access to the downloaded data as a NativeArray.
GetProgress UnityWebRequest.downloadProgress にアクセスするときに呼び出されるコールバック
GetTexttext プロパティーがアクセスされたときに呼び出されるコールバック
ReceiveContentLengthHeader Content-Length ヘッダーを受信したときに呼び出されるコールバック
ReceiveDataリモートサーバーからデータを受信したときに呼び出されるコールバック
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961