- Home /
How to add a grid to an image?
Hello, I am using the UnityPro/iPhonePro trial version. Making a card game in 2D, I have a large image containing the 52 playing cards. I've imported it as an asset, but now I don't know how to proceed.
Is this done via script? I'm reading this, and I think it's what I want to do.
http://forum.unity3d.com/threads/3712-Bringing-2D-images-into-the-scene?p=27485&viewfull=1#post27485
Thanks!
just FTR - if you're an absolute beginner just grab something like 2DToolkit to do any such 2D jobs. It is absolutely simple - just drag in the PNGs. Hope it helps
Answer by DaveA · Jan 31, 2011 at 05:27 PM
Sound like a job for UV mapping. You could do this with a modeller (I like Blender cuz it's free). You could do this with a script as well, see example here: http://unity3d.com/support/documentation/ScriptReference/Mesh-uv.html
Well, apply what? If you generate UV's like you see in that link (with the math appropriate for your image, of course), you set that to the mesh. Ah, perhaps this: You'll want one mesh per card, and each of those meshes will use the same texture, but different uv's.
If you were doing this with a modeller like Blender or whatever, you'd make 52 different quads and the same texture, with different UV maps. Want a link to a good Blender UV tutorial?
Your answer
Follow this Question
Related Questions
problem with gap at specific radius 0 Answers
Allign grid with Splatmap 0 Answers
Gui grid text color changing and mouse hover 0 Answers
Allign a grid on top of the Splatmap grid in Unity 0 Answers
How to make a grid plan as 3dsmax 0 Answers