insidepax.blogg.se

Unity asset bundle viewer
Unity asset bundle viewer










unity asset bundle viewer

The best part is that you do not need to have a macOS machine! Get startedĮditor’s Note: First published in April 2019, updated in November 2020. GameObject objectFound = assetBundle.Use Codemagic for automatic code signing. String gameObjectName = Path.GetFileNameWithoutExtension(gameObjectsName).ToString() String allAssetNames = assetBundle.GetAllAssetNames() ĭebug.Log(allAssetNames.Length +"objects inside prefab bundle") įoreach (string gameObjectsName in allAssetNames) Gets name of all the assets in that assetBundle. UnityWebRequestAssetBundle.GetAssetBundle(url, new CachedAssetBundle(manifestFileName, hashCode), crcNumber) ĪssetBundle assetBundle = DownloadHandlerAssetBundle.GetContent(webrequest) Get from generated manifest file of assetbundle. IEnumerator FetchGameObjectFromServer(string url,string manifestFileName,uint crcR,Hash128 hashR) You are now all set up to fetch the Bundle files from your server and use them in your game. You can delete the created asset bundles in Assets > StreamingAssets after you learn how to directly load scenes, images, and scenes from the link. In my case, I used GoogleDriveDirectLinkGenereator.

unity asset bundle viewer

Get the link of the file from Drive and convert it to a direct link. This contains info about the Asset Bundle's hash128, crcNumber, version, etc.įor testing purposes, place the extensionless assetBundle file in a Google Drive. This is the AssetBundle file to download and use.Ģ) A file with a. For each AssetBundle, you should see two types of files being generated in your StreamingAssets folder.ġ) An extensionless file. Now the remaining task is to place the Bundle files anywhere you like so you can download and use them according to your need. Asset Bundle Files Step 2: Adding the AssetBundle to a Server‌‌ The Asset Bundle files will be created in the StreamingAssets folder. Now go to Unity Editor and Assets -> Build AssetBundles. Do this for all gameObjects to create a full Asset Bundle. Open the menu, then click Create New and choose whichever Bundle fits best. You can assign the particular AssetBundle type through the drop-down menu of each asset. For example, we create a sceneBundle for scenes, a prefabsBundle for prefabs, an imageBundle for images, and so on and so forth. You can create Asset Bundles that contain prefabs, images, or scenes in particular by defining their AssetBundle type. We will then define the assets we create as AssetBundles. If (!Directory.Exists(Application.streamingAssetsPath))ĭirectory.CreateDirectory(assetBundleDirectory) īuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None,ĮditorUserBuildSettings.activeBuildTarget) ĭebug.Log(" failed to create bundled assets" + e) String assetBundleDirectory = "Assets/StreamingAssets" You need to put this file under the Assets > Editor folder.ĭo not try to attach this script to any gameObject in the editor, simply place it inside the Editor folder.












Unity asset bundle viewer