Coder Social home page Coder Social logo

unity-runtimeatlas's Introduction

##About This project is intended to make displaying a large number of dynamically loaded texture assets more memory efficient. The project was built using Unity3D v4.3. To test the project, run the test scene.

##The Problem While working on Crystal Casters we had to dynamically load and display a large number of 2D assets. The only efficient way to accompolish this is to pack all the assets into one or more atlases. Unity does have a Texture2D.PackTexture method, but this method was of no use to us. The problem with Texture2D.PackTexture is that once you have packed a texture you can not easily add new textures to it. At the time no other runtime tools where available, so we had to make a new one.

##The solution I implemented this texture packer based on a Shadow Map packing technique The CreateAtlas Method of AtlasCreator stores all needed information for how a map is filled in without needing to store any of the actual textures. This allows the program to unload all assets used in an atlas as soon as they are added to the atlas.

##NGUI I stripped all NGUI related code out of this demo, but originally this packer was created for use with NGUI. The actual atlas packer is generic enough to be used in any context outside of NGUI.

unity-runtimeatlas's People

Contributors

johnwolve avatar

Watchers

Moqi avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.