0
\$\begingroup\$

I previously wrote a TileEngine with SFML that I would like to port to Unity3D 4.3, but have not found a way to draw a tile on the screen programmatically in Unity.

All I am looking for something akin to SFML's RenderTexture(), and not a plugin or something from the asset store.

I am using Unity 4.3's new 2D tools/workflow, and as such need a method that will work with the 2d viewport.

\$\endgroup\$
10
  • \$\begingroup\$ You can't. Rendering to textures (RenderTexture) is a Unity Pro feature. \$\endgroup\$
    – bummzack
    Commented May 18, 2014 at 12:11
  • 1
    \$\begingroup\$ Seriously? Is there no other way I can do a tile engine in unity free? \$\endgroup\$
    – Neophyte
    Commented May 18, 2014 at 12:29
  • \$\begingroup\$ Render-to-texture sounds like a bad idea for a tile engine. I would do it by making a grid of polygons with different texturing on each polygon. \$\endgroup\$
    – jhocking
    Commented May 18, 2014 at 13:25
  • \$\begingroup\$ That's exactly what I'm looking for, an example on how to do it. I used RenderTexture in SFML, but I want to know what would be best in unity for a tile engine, and a pointer in the right direction on how to get started. \$\endgroup\$
    – Neophyte
    Commented May 18, 2014 at 13:41
  • 1
    \$\begingroup\$ Would GUI.DrawTexture() and GUI.DrawTextureWithTexCoords() be relevant? They let you draw an arbitrary rectangle of texture to the screen, without setting up mesh vertices or materials manually. \$\endgroup\$
    – DMGregory
    Commented May 18, 2014 at 22:55

1 Answer 1

1
\$\begingroup\$

The following two guides programmatically create squares using a mesh, which is along the lines of what I was looking for.

http://studentgamedev.blogspot.no/2013/08/unity-voxel-tutorial-part-1-generating.html https://www.youtube.com/playlist?list=PLbghT7MmckI4qGA0Wm_TZS8LVrqS47I9R

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .