Manages the AvatarGallery api. Launch a web request to AvatarGallery API to get the json representation of the avatar database.
More...
|
static IEnumerator | RequestAvatarGalleryJson () |
| Method which tries to download the list of available avatars from the remote server. Coroutine version.
|
|
static void | RequestAvatarGalleryJson (UnityAction< UnityWebRequest.Result > action) |
| Method which tries to download the list of available avatars from the remote server. Callback version.
|
|
static IEnumerator | DownloadAssetBundle (string avatarName, string provider, string localPath) |
| Tries to download a given avatar from the given provider. If the avatar metadata has not been loaded, it will be query for it. Coroutine version.
|
|
static void | DownloadAssetBundle (string avatarName, string provider, string localPath, UnityAction callback) |
| Initiate download of an Asset bundle from Avatar Gallery. Callback version.
|
|
static List< AvatarData > | GetData () |
| Returns the list of the avatar data. The method RequestAvatarGalleryJson should be called in order to initialize the data.
|
|
static bool | TryGetAvatarMetadata (string name, string provider, out AvatarData avatarData) |
| Method to recover the metadata of a given avatar.
|
|
|
static string | AvatarGalleryURL [get] |
|
|
static void | ProcessDownloadRequest (UnityWebRequest request, string avatarName, string provider, string localPath, UnityAction callback) |
| CallBack from a download request of an avatar from Avatar gallery. Used by DownloadAssetBundle.
|
|
static void | ProcessWebRequest (UnityWebRequest apiRequest) |
| Helper method to process the web request from avatar-gallery.
|
|
|
const int | timeout = 10 |
|
static List< AvatarData > | avatars = null |
|
static bool | requestingGalleryJson = false |
|
static bool | requestingAvatar = false |
|
static UnityEvent< UnityWebRequest.Result > | OnReceiveJsonRequest |
|
static UnityEvent | OnReceiveAvatarRequest |
|
Manages the AvatarGallery api. Launch a web request to AvatarGallery API to get the json representation of the avatar database.
◆ RequestAvatarGalleryJson()
static void Inria.Avatar.AvatarReady.AvatarGalleryApi.RequestAvatarGalleryJson |
( |
UnityAction< UnityWebRequest.Result > | action | ) |
|
|
inlinestatic |
Method which tries to download the list of available avatars from the remote server. Callback version.
- Parameters
-
action | Unity Action taking a UnityWebRequest.Result, Called when request is completed |
◆ DownloadAssetBundle() [1/2]
static IEnumerator Inria.Avatar.AvatarReady.AvatarGalleryApi.DownloadAssetBundle |
( |
string | avatarName, |
|
|
string | provider, |
|
|
string | localPath ) |
|
inlinestatic |
Tries to download a given avatar from the given provider. If the avatar metadata has not been loaded, it will be query for it. Coroutine version.
- Parameters
-
avatarName | Avatar name |
provider | Avatar provider |
localPath | Path to save the assetBundle |
◆ DownloadAssetBundle() [2/2]
static void Inria.Avatar.AvatarReady.AvatarGalleryApi.DownloadAssetBundle |
( |
string | avatarName, |
|
|
string | provider, |
|
|
string | localPath, |
|
|
UnityAction | callback ) |
|
inlinestatic |
Initiate download of an Asset bundle from Avatar Gallery. Callback version.
- Parameters
-
avatarName | Avatar name |
provider | Avatar provider |
localPath | Path to save the assetBundle |
callback | Callback to call when the download is completed |
◆ ProcessWebRequest()
static void Inria.Avatar.AvatarReady.AvatarGalleryApi.ProcessWebRequest |
( |
UnityWebRequest | apiRequest | ) |
|
|
inlinestaticprivate |
Helper method to process the web request from avatar-gallery.
- Parameters
-
apiRequest | Unity Web request |
◆ GetData()
static List< AvatarData > Inria.Avatar.AvatarReady.AvatarGalleryApi.GetData |
( |
| ) |
|
|
inlinestatic |
Returns the list of the avatar data. The method RequestAvatarGalleryJson should be called in order to initialize the data.
- Returns
- List of AvatarData
◆ TryGetAvatarMetadata()
static bool Inria.Avatar.AvatarReady.AvatarGalleryApi.TryGetAvatarMetadata |
( |
string | name, |
|
|
string | provider, |
|
|
out AvatarData | avatarData ) |
|
inlinestatic |
Method to recover the metadata of a given avatar.
- Parameters
-
- Returns
- True if avatar found, false otherwise
The documentation for this class was generated from the following file: