Notes from the KAYAC hyper-casual team
Tag: Unity Assets (12)
Writing Out Every Asset Reference
A Unity editor tool that writes out which assets reference which, and everything each prefab, scene and ScriptableObject pulls in: how to use it to check for unused assets or bloated scenes, how it is built on AssetDatabase.GetDependencies, and ideas for extending it.

On the Size of Nested Prefabs
An experiment showing that Unity appears to expand nested prefabs in full at build time, so build size and load time grow with the real number of GameObjects, plus how ParticleSystem bloated a product's stage prefabs and some ideas for countermeasures.

"Which Textures Are the Big Ones?" Dumping a List of Textures
A small Unity editor script that lists every texture in a project with its estimated memory size, format and settings, so you can find oversized textures and see where the size goes.

Do We Even Need UnloadUnusedAssets()?
An experiment in Unity 2018.4 showing that textures are not freed automatically unless Resources.UnloadUnusedAssets() is called, in the editor and in a macOS build, with thoughts on when to call it and a pitfall with it in editor extensions.

Sending Assets Straight from the Unity Editor to a Phone for Checking
A prototype that builds the selected prefabs into an asset bundle in the Unity Editor and sends it over Wi-Fi to an HTTP server running on a phone, so artists can check them on the device right away, with notes on the motivation, connection handling, transfer speed and shader replacement.

Getting a Mesh Out of Unity as an .obj
How to save a mesh generated in Unity as an asset with AssetDatabase.CreateAsset(), and how to write it out as an .obj file from a context menu so it can be used outside Unity, with a short look at the .obj format.

I Made a Library That Eases Some of My Gripes with AssetBundles
A sample Unity library that downloads AssetBundles, stores them locally and loads assets from them: its features, how to use it, how it manages local files and dependencies, why it is asynchronous only, and its debug features.
Keeping Assets from Being Duplicated Between AssetBundles and the App Itself
A Unity editor tool that lists references from assets outside a chosen folder to assets inside it, to catch AssetBundle material that the app's own prefabs still reference, with how it works, ideas for customizing it and related dependency searches.

Which DownloadHandler Is Fastest for Downloading and Saving AssetBundles?
Measurements of downloading and saving 1,000 AssetBundles in Unity with DownloadHandlerAssetBundle, DownloadHandlerFile, DownloadHandlerBuffer with synchronous saving, and a custom DownloadHandler with asynchronous saving, looking at parallelism, randomized order, time, memory and spikes, with the implementations explained.

Texture Compression with Luminance + Chrominance (YUV, or YCbCr)
A texture compression technique for Unity that converts RGB into luminance and chrominance and halves the resolution of the chrominance, with the encoder, the decoding shader, results, weaknesses, alpha support, and a comparison with indexed color.

Rethinking 16-Bit Color
How reducing textures to 16-bit color (ARGB4444 and RGB565) works, how to round so the error stays small, why banding shows, and a custom Unity importer that applies Floyd-Steinberg dithering.

Memories of Indexed-Color Textures: The Good Old Palette
An experiment implementing indexed-color (palette) textures in Unity: their pros and cons against ETC2 and other formats, the importer, component and shaders (including hand-written bilinear filtering), speed measurements, and palette animation.