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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

UI Image set depth

Discussion in 'UGUI & TextMesh Pro' started by GIGABAR, Sep 2, 2014.

  1. GIGABAR

    GIGABAR

    Joined:
    Jul 2, 2012
    Posts:
    4
    How to set depth on UI Image?
    i'll be grateful for answer!!
     
  2. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    re-order them in the Hierarchy window. top to bottom. Bottom most is above everything else.
     
    CarterG81 likes this.
  3. GIGABAR

    GIGABAR

    Joined:
    Jul 2, 2012
    Posts:
    4
    i know)) but how set depth with script?)))
     
  4. GIGABAR

    GIGABAR

    Joined:
    Jul 2, 2012
    Posts:
    4
    да че за х... как применить слой UI Image в коде? раньше был sorting order а что сейчас?
    how set depth on UI Image in code?????
     
  5. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    There are other posts on this subject. But you need to use transform.SetAsFirstSibling, SetAsLastSibling, SetSiblingIndex, GetSiblingIndex