Version: 5.4
public AudioClip GetAudioClip (bool threeD);
public AudioClip GetAudioClip (bool threeD, bool stream);
public AudioClip GetAudioClip (bool threeD, bool stream, AudioType audioType);

パラメーター

threeD Use this to specify whether the clip should be a 2D or 3D clip the .audioClip property defaults to 3D.
stream Sets whether the clip should be completely downloaded before it's ready to play (false) or the stream can be played even if only part of the clip is downloaded (true). The latter will disable seeking on the clip (with .time and/or .timeSamples).
audioType ダウンロードコンテンツの AudioType。これが設定されていない場合は Unity は URL でタイプを判断します

戻り値

AudioClip AudioClip を返します。

説明

ダウンロードしたデータから AudioClip を生成し返します(読み取り専用)

データは Ogg(Web/Standalones)、MP3(モバイル)、WAV の AudioClip でなければいけません。XM、IT、MOD、S3M フォーマットはストリームできますが、リアルタイム再生はサポートされていませんので、すべてのデータが再生前に準備できてないといけなく、AudioSouece へのアサインと再生の前に AudioClip.isReadyToPlay が true を返すのを待たなければいけません。

Note: Unity 5.x threeD では引数は無視されます。サウンドは 3D、2D にかかわらず AudioSource コンポーネントを制御します。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961