Class UsesWebMethods
Namespace: Unity.Labs.EditorXR.Interfaces
Syntax
public static class UsesWebMethods
Methods
Download(IUsesWeb, String, Action<UnityWebRequest>)
Download a resource at the given URL and call a method on completion, providing the UnityWebRequest
Declaration
public static void Download(this IUsesWeb user, string url, Action<UnityWebRequest> completed)
Parameters
Type | Name | Description |
---|---|---|
IUsesWeb | user | The functionality user |
String | url | The URL of the resource |
Action<UnityWebRequest> | completed | The completion callback |
Download(IUsesWeb, String, String, Action)
Download a resource at the given URL to the given destination file and call a method on completion
Declaration
public static void Download(this IUsesWeb user, string url, string destination, Action completed)
Parameters
Type | Name | Description |
---|---|---|
IUsesWeb | user | The functionality user |
String | url | The URL of the resource |
String | destination | The destination file path |
Action | completed | The completion callback |
Download<THandler>(IUsesWeb, String, Action<UnityWebRequest>)
Download a resource at the given URL using a custom download handler and call a method on completion, providing the UnityWebRequest
Declaration
public static void Download<THandler>(this IUsesWeb user, string url, Action<UnityWebRequest> completed)
where THandler : DownloadHandler, new()
Parameters
Type | Name | Description |
---|---|---|
IUsesWeb | user | The functionality user |
String | url | The URL of the resource |
Action<UnityWebRequest> | completed | The completion callback |
Type Parameters
Name | Description |
---|---|
THandler | The type of download handler to use |