- Home /
How to print assetbundle build size in console?
Hi,
i want to know if it´s possible to print out some information from the "editor-log" file directly in the unity-console? When i build my assetbundles via editor-script, it would be cool the get the exported compressed file size straight in the unity IDE without open the editor log and scroll to that entry..
If its possible - how ? :) Thanks for your time.. yosh
Answer by Jashengmato · Sep 11, 2013 at 02:28 AM
To get the bundle file size:
using System.IO
FileStream fs = new FileStream(assetBundlePath, FileMode.Open) ;
int fileSize = -1;
if(fs != null)
{
fileSize = fs.Length ;
}
To display it, you can rather using Debug.Log() to print it in console, or using UnityEditor.EditorUtility.DisplayDialog();
Your answer
Follow this Question
Related Questions
How to import the object from server to unity 2 Answers
Texture format not saved in asset bundles 0 Answers
Assetbundle for multiple-mode sprite 2 Answers
How do you set asset bundle name on prefab through code? 0 Answers
Memory Locking While Loading Issue 0 Answers