Search Unity

Trying to understand Unity Units

Discussion in 'Getting Started' started by PetherP, Feb 9, 2016.

  1. PetherP

    PetherP

    Joined:
    Aug 7, 2015
    Posts:
    4
    Yoo hoo,

    I have programmed some small games in C++ and Java and have been trying to start with unity a few times the last few years, but haven't come over the threshold to use it for anything. One of the problems i have is that unity goes by units instead of pixels. Is there anyone out there that could give me a good run down about how to relate to them when making my games? Is the normal way to use one unit per tile in a tile based game?
     
  2. MikeTeavee

    MikeTeavee

    Joined:
    May 22, 2015
    Posts:
    194
    Unity by default is 100 pixels per unit, but I never think of things in pixels (maybe that's just me).
    Primitive shapes by default are created 1x1 units so that's a decent tile size...?
    Hope this helps.
     
    JoeStrout likes this.
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yeah, what Mike said. You can define units however you like; one unit per tile is a very sensible way.

    If you're new to Unity and making a tile-based game, you should consider browsing the Asset Store for tile map systems. They will take care of a lot of the boilerplate code for you, and get you up and running much faster.
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I tend to use something like 128 or 256 for tile games. That way you have POT textures everywhere, which Unity likes.

    But generally use whatever makes sense for you art and gameplay.
     
  5. MikeTeavee

    MikeTeavee

    Joined:
    May 22, 2015
    Posts:
    194
    Just wondering, why does Unity like power of two textures?
     
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    They are easier to compress. Its not a huge deal, but it does help with game size on a big project.