All Projects → aschearer → Unitysizeexplorer

aschearer / Unitysizeexplorer

Licence: mit
Visualize how much space each asset in your Unity game takes and quickly optimize your game's file size

Projects that are alternatives of or similar to Unitysizeexplorer

Swissarmylib
Collection of helpful utilities we use in our Unity projects.
Stars: ✭ 154 (-36.36%)
Mutual labels:  unity, unity3d, optimization
Contactshadows
Experimental implementation of contact shadows for Unity.
Stars: ✭ 219 (-9.5%)
Mutual labels:  unity, unity3d
Nodulus
Puzzle game with clever twists (Unity3d)
Stars: ✭ 232 (-4.13%)
Mutual labels:  unity, unity3d
Xrtk Core
The Official Mixed Reality Framework for Unity
Stars: ✭ 219 (-9.5%)
Mutual labels:  unity, unity3d
Casinosclient
果派德州客户端源代码,使用Unity3D引擎。
Stars: ✭ 217 (-10.33%)
Mutual labels:  unity, unity3d
Procedural Worlds Editor
Procedural World Editor is a node based procedural terrain generator
Stars: ✭ 218 (-9.92%)
Mutual labels:  unity, unity3d
Openseeface
Robust realtime face and facial landmark tracking on CPU with Unity integration
Stars: ✭ 216 (-10.74%)
Mutual labels:  unity, unity3d
Nativecollections
Native Collection Types for Unity
Stars: ✭ 213 (-11.98%)
Mutual labels:  unity, unity3d
Unity Utilities
A collection of Unity3D scripts I've been sharing between projects - open source, fully commented and with examples.
Stars: ✭ 224 (-7.44%)
Mutual labels:  unity, unity3d
Catlib
CatLib for unity3d dependency injection framework
Stars: ✭ 228 (-5.79%)
Mutual labels:  unity, unity3d
Apple Signin Unity
Unity plugin to support Sign In With Apple Id
Stars: ✭ 228 (-5.79%)
Mutual labels:  unity, unity3d
Noteeditor
Note editor for rhythm games.
Stars: ✭ 216 (-10.74%)
Mutual labels:  unity, unity3d
Noiseball2
A small example of procedural modeling with compute shaders.
Stars: ✭ 215 (-11.16%)
Mutual labels:  unity, unity3d
Hololenscamerastream
This Unity plugin makes the HoloLens video camera frames available to a Unity app in real time. This enables Unity devs to easily use the HoloLens camera for computer vision (or anything they want).
Stars: ✭ 233 (-3.72%)
Mutual labels:  unity, unity3d
Minis
Minis: MIDI Input for New Input System -- A plugin that adds MIDI input support to Unity's new Input System
Stars: ✭ 214 (-11.57%)
Mutual labels:  unity, unity3d
Mathutilities
A collection of some of the neat math and physics tricks that I've collected over the last few years.
Stars: ✭ 2,815 (+1063.22%)
Mutual labels:  unity, unity3d
Il2cppdumper
Unity il2cpp reverse engineer
Stars: ✭ 3,362 (+1289.26%)
Mutual labels:  unity, unity3d
Egocs
EgoCS: An Entity (GameObject) Component System framework for Unity3D
Stars: ✭ 211 (-12.81%)
Mutual labels:  unity, unity3d
Wfcmaze
WFC (Wave Function Collapse) with Unity
Stars: ✭ 212 (-12.4%)
Mutual labels:  unity, unity3d
Urmotion
Flexible motion engine for non time-based animation in Unity.
Stars: ✭ 220 (-9.09%)
Mutual labels:  unity, unity3d

Unity Size Explorer

Build status

Unity Size Explorer example

Quick Start

Just want to run the tool using a pre-compiled binary?

Download Unity Size Explorer

Background

While developing Tumblestone for mobile devices I needed to greatly reduce the amount of disk space the game required. For iOS in particular games must be at or below 100 mb. Players must be on wifi in order to download games above 100 mb -- initially, Tumblestone was over 1 gb! I developed this tool to help reduce Tumblestone from 1 gb to 100 mb.

Normally, you can view Unity Editor's log after building to see some stats on a game's file size. This is what it looks like:

Textures      33.1 mb	 54.1% 
Meshes        0.0 kb	 0.0% 
Animations    0.0 kb	 0.0% 
Sounds        8.3 mb	 13.6% 
Shaders       172.8 kb	 0.3% 
Other Assets  8.2 mb	 13.4% 
Levels        82.1 kb	 0.1% 
Scripts       4.7 mb	 7.7% 
Included DLLs 6.4 mb	 10.5% 
File headers  201.5 kb	 0.3% 
Complete size 61.3 mb	 100.0% 

Used Assets and files from the Resources folder, sorted by uncompressed size:
 2.1 mb	 3.4% Assets/Spritesheets/v2/Spritesheet1.png
 2.1 mb	 3.4% Assets/Spritesheets/v2/Spritesheet2.png
 2.0 mb	 3.3% Assets/Spritesheets/v2/Spritesheet3.png
 2.0 mb	 3.3% Assets/Spritesheets/v2/Spritesheet4.png
 // list continues for every file included in the game

This is quite helpful. It tells you how big your game is and breaks things down by high level categories. You can even look through the list of assets that follows to find the worst offendors. When first starting to optimize file size this is sufficient as oftentimes the largest files (listed at the top) can be optimized yielding big improvements.

However in the quest to fit under 100 mb I reached a point where the list of files was no longer very useful. That's because there was no longer one or two big files to optimize. Everything non-essential was already quite small, and if I wanted to carve off another 10 or 15 mb I needed to strike at whole folders or class of files. Unity's log file, which lists every file sorted by size, makes it very hard to see the bigger picture.

Further aggravating things is the fact that Unity only generates the above after building. In my case building for iOS often took 5 to 10 minutes. This meant that my workflow was drawn out as I made a change, built, then compared the old and new log files. Sometimes the results worked as expected and I could continue. Other times the changes had a smaller impact and were discarded. I needed a way to more quickly and accurately gauge what impact an optimization would have without having to spend 10 minutes per an iteration.

That's where this tool comes in. It reads the log file and generates a tree view and pie chart. The tree view lists every file grouped by folder -- just like in the file system. You can expand or collapse folders to view sub-folders and files. You can check on or off a given file or folder, excluding the corresponding size from the projected game file size. Plus there's a nice pie chart visually showing how much space everything uses relative to the rest of the project.

Questions, Bug Reports or Feature Requests?

Do you have feature requests, questions or would you like to report a bug? Please post them on the issue list.

Contributing

As this project is maintained by one person, I cannot fix every bug or implement every feature on my own. So contributions are really appreciated!

A good way to get started:

  1. Fork the Unity Size Explorer repo.
  2. Create a new branch in you current repo from the 'master' branch.
  3. 'Check out' the code with Git or GitHub Desktop
  4. Push commits and create a Pull Request (PR)

License

Unity Size Explorer is open source software, licensed under the terms of MIT license. See License.txt for details.

How to Build

Unity Size Explorer is a WPF program written for Windows. It requires .NET 4.5.2. Use Visual Studio and open solution file under Source. You may need to restore Nuget packages on first run.

How to Run

  1. Double-click UnitySizeExplorer.exe
  2. Go to File > Open
  3. Navigate to Unity Editor's log file. (Typically under $HOME\AppData\Local\Unity\Editor)
  4. Check or uncheck items in the tree view to add/remove them from the pie chart and estimated file size. Expand folders to work with their children directly.
  5. It helps if you first filter out very small files as they clutter the UI and can make the tool sluggish. Go to Filter > Small. These items will still be counted in the final size, but will be hidden from the tree view and pie chart.
  6. Note that you must clear the contents of the log file before building in Unity to ensure that there is only one size entry.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].