Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am new to Unity (came from AS3/Starling) and just started for 2D games in Unity. I have a spritesheet / texture-atlas (many different sized images packed in a single png) which I want to download at runtime (I can use WWW classes for that) in game .

Than use all those images (in that sprite atlas) and show them up on screen and use them as regular unity sprites, like applying Rigidbody2D or Collider2D etc. I googled for this but mainly what I found is using Unity3D's editor, importing the sprite atlas and using its own sprite editor. Not much on how I would do that in runtime. I am expecting something like what we used to do in Flash or evening in Cocos2d, like we have a related XML file for each sprite atlas and their SDK have functions for reading that sprite in conjunction with that XML.

Any help would be highly appreciated.

share|improve this question
    
Did you read this. I think it sums it up. Did not take long to google. –  Zehelvion Mar 14 at 9:45
    
Ya, I already read this. But this only gives how to load resources at runtime but not how to specifically manage multiple sized sprite atlases loaded at runtime. –  user43371 Mar 14 at 11:44
    
I am not familiar with it (hence no answer) but wouldn't you need to prepare the asset in advance, put it online and the load it during runtime? I think the management part happens offline before you upload the assets. I think unity is expecting you to do things a certain way where AS3 is more of a set of tools where you do what you want ( I could be wrong). –  Zehelvion Mar 14 at 13:07
    
Ya, normally we don't need to do these kind of things but the requirement for my game is like that only. I want to download different set of images at runtime and based on that images the game play happens. Its like there will be 100-150 images that will be downloaded. So I thought why not to group them in a atlas (also they are of different size) but even after making atlas and downloading it, how will I get to know which image is fo what size and x/y positions, except I store that information in a xml/txt file (and how will I read that file in Unity?)?. –  user43371 Mar 14 at 13:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.