First you will need a 2nd image of the same size/resolution as a dummy image. Dummy image is the one that will be on your level floor.
Now, the box that you show representing Where to color in, you will use that box, as a percentage normalized ie x(0.0-1.0) y(0.0-1.0) ok, following me? Use the normalized positions of your boundary to get pixels on the master image which correspond with the floor, clear the floor once by setting the pixels to default background (Clearing any previous floor), and then set the new pixels on the material/texture assigned to the floor.
Half your battle can be found here
http://docs.unity3d.com/ScriptReference/Texture2D.GetPixels.html
Good luck
↧