0

I already know how to set a function for creating Asset Bundle in unity locally. First I set a local directory for Asset Bundle files, Then I upload the files to Dropbox and it works! But I was wondering if I could upload the Asset Bundle files to the server directly. I know about POST, But I don't know how to implement it in this case

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class AssetBundleCreate : Editor
{
    [MenuItem("Assets/Create AssetBundle")]
    static void CreateAssetBundle()
    {
        BuildPipeline.BuildAssetBundles(@"C:\Users\Heisenberg\Desktop\AssetBundle",BuildAssetBundleOptions.ChunkBasedCompression,BuildTarget.StandaloneWindows64);
    }

}
  • You would need to know the [API of Dropbox](https://www.dropbox.com/developers/documentation/http/documentation) and then do a webrequest with all required parameters and probably rather using PUT .. in the current state this question is very broad and probably off-topic due to "Asking for a Tool/Library/Tutorial/etc" – derHugo Sep 15 '21 at 06:33
  • Okey it's actually POST for everything ;) but still you will have to prepare and send exactly the headers and JSON content required to perform your upload correctly. In particular you will need to implement oAuth authentication ... Quite an overhead if it is only for yourself and not for any users of the app ... simply making the upload manually sounds actually easier ^^ – derHugo Sep 15 '21 at 06:42

2 Answers2

0

For manager assets bundle you use to Addressable Assets this is best for download and upload asstes

https://docs.unity3d.com/Packages/com.unity.addressables@0.4/manual/index.html

https://www.youtube.com/watch?v=XIHINtB2e1U

0

Try firebase. (actually, firebase storage)

And also read this if you want to upload your stuffs with Unity. (i think it also works with Unity Editor) https://firebase.google.com/docs/storage/unity/upload-files

firebase storage has its own CDN, so faster than AWS s3. (AWS also has its CDN solution, but not automatically integrated with S3)

mharti
  • 180
  • 8