0

I need to retrieve some AssetBundles that are stored on a remote server. This server requires authentication.

I have been looking into the AssetBundleManager, which seems an easy way to do that. However, I can't find any way to provide the authentication credentials to the AssetBundleManager.

So my question is this. Can I access AssetBundles in a server that requires authentication with the AssetBundleManager or do I have to go another way?

In case the second is true. Is using UnityWebRequest the only way to pass the authentication credentials in the header of the request?

EDIT: As requested in the comments I am using C#.

The authentication is token authentication (JWT) in the form of

Autorization header: bearer token

Corcus
  • 1,070
  • 7
  • 25
  • What type of authentication? What language and what have you tried. You can modify your question with these info – Programmer Aug 25 '17 at 10:14
  • @Programmer Just added the info you suggested – Corcus Aug 25 '17 at 10:21
  • It sounds like OAuth 2.0 . See answer from [this](https://stackoverflow.com/questions/45747010/how-to-get-oauth2-token-with-the-www-api) – Programmer Aug 25 '17 at 10:29
  • @Programmer Thanks for the tip. Something like this is my plan B. First I want to see (or rule out) the AssetBundleManager since it seems a lot easier. Do you know if I can add an Autorization header to the web request that will happen after this AssetBundleLoadAssetOperation request = AssetBundleManager.LoadAssetAsync(assetBundleName, assetName, typeof(GameObject) ); – Corcus Aug 25 '17 at 10:51
  • Do you see any parameter you can pass that Authorization header to in the LoadAssetAsync function? – Programmer Aug 25 '17 at 16:52

0 Answers0