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. Dismiss Notice

Interface design / creation general questions.

Discussion in 'UGUI & TextMesh Pro' started by Christian-Tucker, Jan 3, 2015.

  1. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    I'm not exactly sure if this is the correct board for this kind of topic; However since the official release of Unity 4.6 interface design has never been easier, in-fact... when I saw how easy it was in the beta I literally started to cry, because interfaces were the only thing stopping me from finishing some massive projects. (I hated the old GUI system)

    I'm curious as to what I should be using in terms of textures for my interfaces for optimal performance and crisp display. I've been thinking a lot about sprites, but I'm not sure about the resolutions required, do they need to be ^2? I know Unity doesn't REQUIRE it, but if it's not does this reduce functionality on certain systems? What's a good texture size for a medium quality game? 128x128? 256x256?

    When creating a UI, is layering sprites really required? for example:
    1. Health bar fill
    2. Health bar outline -- drawn ontop of the fill
    Then we modify the health bar fill to be up to date with the healths current value.

    This creates more draw calls, is there a way to limit these?

    Looking for UI based game-dev advice.
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,523
    You'll probably get more technical advice in the dedicated Unity UI forum. But in general my recommendation is to identify your highest target resolution (e.g., 1024x768) and design the textures to be pixel-perfect for that resolution. Then put them all in the same big texture atlas and use sprites. This can significantly reduce draw calls. Your atlas texture should be a power of two, but individual sprites inside it can be any size.
     
    theANMATOR2b likes this.
  3. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    Interesting, so usinga TextureAtlas reduces draw calls?
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,523
    Yes, but you don't have to do it manually. If you set all the textures' packing tags to the same value, Unity will atlas them behind the scenes for you.