rotafri.blogg.se

Unity pc build compression
Unity pc build compression












unity pc build compression

#Unity pc build compression zip#

When you assign assets to a group, you are effectively packing these assets together like in a ZIP file.Īnd as you might recall with WinZIP and its family, you have several compression settings. The question is then: how can you make the most of compression in your game? You can choose between the compression modes below: And as we saw, different content type require different packaging (groups).Ĭompression is one of the group parameters that will determine how efficiently Unity stores and loads your assets. Your game might have thousands and thousands of assets. To learn more about addressables, check my Addressables Tutorial (Learn the Basics). Groups dictate the way you store and deliver your assets, including compression settings (a looser or a tighter cardboard box).Īssigning assets to groups is easy as you can see below. And the different packaging you put your assets in are your groups. Well, Coca-cola, fanta, water, bread, rice are your assets. Each packaging is well suited for certain types of goods. You don't want to pour some cola into a paper bag you put bread into. In every supermarket you'll see tons of assets: (warm) soda drinks, bread, juicy fruit, etc. With addressables we organize all our content around asset groups.Īnd addressable groups are data buckets that contain our assets in a very specific way. Optimizing memory has many secondary benefits such as reduced loading times, less crashes and better user reviews, i.e. When we use Addressables, we aim to optimize memory usage.īut that's not all. This gives youan immense control over memory. Indirect references let you decide when to load and unload your content into and out of your memory. Unity Addressables is the piece of technology game developers urgently needed to use indirect references. This is comfortable, but often leads to an explosion of memory consumption. Direct references load all assets automatically for you into memory. The default way of working with assets in Unity is by using direct references your content. I decided to make a benchmark to understand the real-world implications of Unity addressables compression modes.Īnd today I'll share with you the results of my investigation and my thoughts on the subject.Ĭhapter 2: What Is Addressables Compression?Ĭhapter 3: Benchmarking Addressables Compression So as it often happens with Addressables, I couldn't count on them.īut in spite of the time investment, here's the deal: I decided I would make the research worth. Of course, the lack of Addressables documentation from Unity's side was to be expected.

unity pc build compression

is paying attention to this really worth my time? However, at the same time, I couldn't stop asking myself. I really wanted to see what difference each mode did in real-life.

unity pc build compression

The three compression modes Unity offers you are: Uncompressed, LZ4 and LZMA. Unity gave me a powerful tool I could use to work on two crucial variables: storage size and CPU performance.

unity pc build compression

There I clearly saw the opportunities Unity gave me. Interesting, this will prove to be useful, I said to myself. One instantly caught my attention: the asset bundle compression mode. So I went through all Addressable settings I could find. There was so many features I was missing out. Not bad.īut I was just barely scratching the surface of Addressables. The result was a 50% memory usage reduction. So the natural way to go was the addressables route.Īfter putting some great effort into learning the system, I got a rock-solid system up and running. I had just too much content to fit in RAM. Some time ago, I had the goal to optimize the memory usage of my game. So if you want to make the most of Unity addressable assets, you'll find this post useful. Should you use Uncompressed, LZ4 or LZMA?.














Unity pc build compression