Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[Free] Grid generator

Discussion in 'Assets and Asset Store' started by Alienchild, Aug 24, 2011.

  1. Alienchild

    Alienchild

    Joined:
    Oct 14, 2010
    Posts:
    364
    Hi all

    Was just prototyping an idea I had for a simple tower defense game and figured that the grid generator might be handy for others. The package can be downloaded here. It contains a folder called Grid. Place it anywhere you want in your project. To generate the grid go to Windows and select the TDEditor window. Fill in how many you want on the X and Y axis and click on the generate button. It generates a bunch of 4-vertex planes, names them by their coordinate and puts them in an empty grid object.

    I hope my code isn't disastrously bad. I'm not well versed in Unity yet ;)
     
  2. Essal

    Essal

    Joined:
    Feb 16, 2010
    Posts:
    107
    Thanks.^^
    Maybe it'll come in handy for a future project. - and if not, i'll learn something from reading the code - in either way, thanks man:)
     
  3. Rafes

    Rafes

    Joined:
    Jun 2, 2011
    Posts:
    764
    Thanks for sharing!

    You might be better off using a large single 2-Tri plane with a repeating grid texture though. Why did you decide to go this route?
     
  4. Alienchild

    Alienchild

    Joined:
    Oct 14, 2010
    Posts:
    364
    Well there wasn't any planning behind this really, I was prototyping a simple 2d tower defense game and got tired of dragging those quads around. It is probably not the best solution for creating a selectable grid where you can also just drop textures around at will, but it works :)