I ask because I am yet to find an answer for what a good guess is for how many textures at X size work well with the editor, I read around that you should work to about 10mb of ram but I am rather clueless to how much is taken up with alpha images of 512x512 for example. Not after a solid number but any Unity users here limit themselves to a set size and amount for their games?
Texture sizes/limitations are not actually your biggest concern on the platform. Spend some time looking into 'draw calls'.. combining textures into one material is the key.
You can use 24 Mb of RAM for textures at a time. I don't know if unity supports compressed textures, though. It takes 4 bytes per pixel for uncompressed texture and 4 or 2 bits for compressed (2bpp is ugly, so I wouldn't use it anyway).
Indeed it does. It depends on the textures. All the maze graphics in Realmaze3D are 2 bit PVRTC (primarily one 1024x1024 and two 512x512 texture atlases for each theme) and it's gotten a lot of comments about having good graphics. The UI stuff is mostly 4 bit PVRTC, plus uncompressed 16 bit for the font. The Unity editor tells you how much RAM each texture uses. --Eric
There's no hard limit on how many textures at X size the editor will take, nor is their a precise amount of RAM dedicated to textures on an iPhone. You just need to make sure your overall memory budget is reasonable, and that you test extensively for crashes if you're finding yourself pushing the envelope. Do not wait until you're "done" to start paying attention to your memory usage. Anywhere under 30mb of total RAM usage is pretty safe territory (that's music, sound effects, textures, scripts, the whole bit). My new game uses a small truckload of 256x256 4-bit PVRTC alpha'd textures (several dozen of them) which are a mere 32kb each, and quite a lot of sound effects too, but I'm still using in the low 20's at peak. Draw calls are a concern too, but I would argue less so than memory consumption. A game with a lot of draw calls run slow. A game with too many uncompressed textures doesn't run at all.
If you haven't already you should start a thread over in the Unity forums... there are a bunch of developers over there making iPhone stuff (me included) and that forum is going to be able to give you a lot more Unity-specific info.
All good info thanks everyone. It would be much better for me to ask at the unity forums but I not visited there for a long time lately, draw call wise I been thinking about that and triangle count all the time so no worries there. I'm trying to use only 4 lots of 256 and so far I have plenty of texture space for everything so I should be alright.
I believe Unity supports streaming too so you can use more than the actual total amount of memory assuming it's not all on-screen at once, right? 24-bit with alpha is 32-bit which means 4-bytes per pixel. So a single 512 x 512 x 32-bit texture will take up around 1 meg of RAM. Make sure you are paying attention to fill rate as well as the # of draw calls. The iPhone has some great 3D hardware but the fill-rate on the 1st gen phones can cause a snag if you aren't careful. Unity may do a good job of handling that though.