

It can create standalone mod installers from changes to. Or you can get the source and include it in your project too if you want.UABE is an editor for 3.4+/-2021.3. net port of zlib, so you don't need Pro to use the DLL. Just in case you're wondering, is a totally C#. Still, if you need to be able to make PNGs and for some reason you can't use Unity's Texture2D to do it, this will work. There are no extra allocations in this code which could cause the massive increase in memory, so I believe its probably got to do with the Z-lib compression making large allocations. Both ways require you convert your Texture2D to a Color array, and both end up creating a byte array for the final PNG. Still, when doing some atlasing tests, Unity 4.3's memory footprint using this went to 1GB, whereas working with Texture2Ds it stayed around 300MB. In Unity 3x, memory just continues to grow (memory leak), but in Unity 4x it does not.

My tests show that compared to working in a Texture2D and then converting to a PNG with Texture2D.EncodeToPNG, this method eats up a TON of memory. However, I wanted to mention something about memory. And I also added a SetPixels function that takes a Unity Color array and writes a block of pixels to the target, inverted on Y because Unity stores textures bottom-up and PNG stores them top-down. I got the PNG encoder from and found it didn't work in Unity because it uses System.IO.Compression.DeflateStream, which Unity's version of Mono does not include.

I know this is an old thread, but I thought I'd post my solution to this problem. I wish Unity would provide a means of storing and manipulating images in system memory, whether it's tagging a Texture2D as a non-hardware texture, or creating some kind of separate Image class. My laptop card can support textures at 2048x2048, but it can take upwards of 10-20 seconds to create it, when it only takes a fraction of a second to build it in system memory. Also, creating and editing a very large Texture2D is extremely slow. Given that the limit will vary depending on hardware, and I can't count on it being all that large, it's really not a feasible option. Will those be generally available to Unity, or will this then be limited to What dreamora said. I'm a bit nervous about the fact that it's importing a bunch of System.Windows.* libraries, though. I'll need to mess with it a bit to make sure it works does what I need. I intend for the map image exporter to be usable by end users when the game is released, so it really needs to be in a format that that's practical for most people, not just something that I can finagle into shape with an image converter Looks promising.
