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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Grid System like Prison Architect

Discussion in 'Scripting' started by hammy2747, Jun 25, 2015.

  1. hammy2747

    hammy2747

    Joined:
    Apr 19, 2014
    Posts:
    19
    Hello,
    I am currently developing a game kind of like PA, and i was wondering how to get the placement of objects on a grid to work. I have been searching around for days, and I've had no luck. Any help is appreciated.
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Which part are you struggling with? Creating the actual grid? Finding out what cell on the grid your mouse is over?

    Help us, help you.
     
  3. hammy2747

    hammy2747

    Joined:
    Apr 19, 2014
    Posts:
    19
    @GroZZleR I need help with all of that. Thanks
     
  4. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    PA works off a 2d array of tiles. It's also pretty much totally mod-able so you can probably work out a lot of the systems from the "how to make mods" support pages: http://prisonarchitectwiki.com/wiki/Modding_guide

    also googling "unity tile map" will come up with loads of approaches for 2d/isometric/3d tile map systems (kinda all the same thing :) )
     
    hammy2747 likes this.
  5. hammy2747

    hammy2747

    Joined:
    Apr 19, 2014
    Posts:
    19
    Thanks! :)