Search Unity

GUI.DrawTexture from an atlas with many textures...

Discussion in 'Immediate Mode GUI (IMGUI)' started by codejoy, Feb 18, 2015.

  1. codejoy

    codejoy

    Joined:
    Aug 17, 2012
    Posts:
    204
    Can I define a source rect somehow so I can have all my GUI textures in one atlas and just chop out what I need when I need it? I am thinking this would save on batching?
    Is it possible looking at the documentation it has a destination rectangle but no way to define a source inside a texture to use? So I am currently having a different file for all my GUI elements which has got to be eating up call draws I am suspecting...

    Wondering if there is a better way?
    (yes not on new GUI system still using < 4.6 cause of other reasons)
     
  2. HenryStrattonFW

    HenryStrattonFW

    Joined:
    Jul 27, 2012
    Posts:
    18