Search Unity

Tile Generation In Editor

Discussion in 'Scripting' started by Camronas, Jan 27, 2015.

  1. Camronas

    Camronas

    Joined:
    Apr 20, 2012
    Posts:
    154
    Hey,
    I am wanting to make a script that allows me to load a text document to a Room Game Object; press a generate button in the editor, and have the room's components be made in the editor so that I can then make artistic changes on the fly.

    Just wondering if this is possible and how would be the best method of going about this?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    This is totally possible. Look into editor scripts. Essentially your code would load a text document, parse it appropriately, iterate through and make the necessary items in the game scene, and then you could save the whole thing as a prefab (for example) or begin editing it from there.

    There might even be packages like that on the asset store.
     
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Have you tried opening a scene file in a text editor? May give you a few ideas.