Search Unity

GUI.ScrollView and Graphics.DrawTexture

Discussion in 'Immediate Mode GUI (IMGUI)' started by Spidyy, Jul 21, 2013.

  1. Spidyy

    Spidyy

    Joined:
    Mar 6, 2011
    Posts:
    184
    Hey there,

    I'm having troubles figuring this out.

    I want to draw a part of a texture I'll be using. For this, Graphics.DrawTexture is the best function I could find. It works greats.

    EXCEPT when I want to draw texture enclosed inside a GUI.ScrollView.

    One solution would be to use GUI.DrawTexture instead, by extracting myself the sub-texture with GetPixel and SetPixel, but this case force me to have all the available textures as Readable/Writable. It's just a pain to set.

    So, is there a way I could have the sub-texture option from Graphics.DrawTexture AND the enclosure inside the ScrollView of GUI.DrawTexture?
     
  2. Ekta-Mehta-D

    Ekta-Mehta-D

    Joined:
    Feb 25, 2013
    Posts:
    24
    hey do u get any solution ?