Search Unity

Applying material to a canvas group

Discussion in 'UGUI & TextMesh Pro' started by wihu, Aug 4, 2016.

  1. wihu

    wihu

    Joined:
    Nov 22, 2012
    Posts:
    25
    Is it possible to apply material for all UI elements in the same hierarchy without assigning them one by one?
    if I have a complex hierarchy of UI and for example i want to grey out the whole UI using a shader/greyscale material, i want to be able to just assign it on one component, like you can set alpha value in a canvas group.
     
  2. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    Did you ever find a solution for this?
     
  3. btyson_z

    btyson_z

    Joined:
    Aug 10, 2018
    Posts:
    9
    @wihu @larku Curious if you guys ever found a good way.

    I did ship a large game with the whole "find and set all childrens' materials" solution, but it was slow/expensive and buggy. I don't want to do that again.
     
  4. DearUnityPleaseAddSerializableDictionaries

    DearUnityPleaseAddSerializableDictionaries

    Joined:
    Sep 12, 2014
    Posts:
    135
  5. BUTTyPOO

    BUTTyPOO

    Joined:
    Apr 11, 2016
    Posts:
    6
    Did you guys find a way?
     
  6. flyingSnowhu

    flyingSnowhu

    Joined:
    Feb 19, 2019
    Posts:
    6
    Did you guys find a way?
     
  7. razveck

    razveck

    Joined:
    Jan 8, 2013
    Posts:
    6
    Did you guys find a way?
     
  8. DearUnityPleaseAddSerializableDictionaries

    DearUnityPleaseAddSerializableDictionaries

    Joined:
    Sep 12, 2014
    Posts:
    135