Version: 2021.1
言語: 日本語
public string url ;

説明

[UnityWebRequest]] と通信するターゲット URL を定義します。

Send を呼び出した後、このプロパティーは設定できません。

[UnityWebRequest]] が発生し、リダイレクトに続く場合、このプロパティーは UnityWebRequest のリダイレクト先となる URL で更新します。

URL を入力するときは 絶対 URL が優先されます。ただし、URL の一部を入力するとシステムはこれらの規則に従います:

入力される URL が 2 つのスラッシュで始まる (//)場合、 入力は HTTP 経由のドメインとパスであると見なされます。

非 WebGL のプラットフォームではシステムが先頭に http: を付加します。 WebGL のシステムは Unity WebGL アプリケーションがアクセスされているパス方式を継承します。

例: WebGL アプリケーションが https 経由でアクセスされている場合、システムが先頭に https: を付加し、http 経由でアクセスされている場合、http: をシステムが先頭に付加します。

入力 URL が 1 つのスラッシュ (/) で始まる場合、 システムは、入力は Unity アプリケーションが実行されている現在のドメインからの相対パスと見なします。非 WebGL プラットフォーム上ではシステムは URL に http://localhost を追加します。

On WebGL, the system will prepend the scheme and host of the path by which the Unity WebGL application is being accessed. For example, if the Unity WebGL app is being accessed via https://unity3d.com/myapp, then the system will prepend https://unity3d.com to relative paths.

If neither of the above rules apply, the system validates your input string via the built-in System.Uri class. If this class throws a URIFormatException, the system attempts to append the input string to the absolute URL by which the Unity app is being accessed. (see above)

さらに例外が再度スローされます。

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