히어라이키 순서 변경(SetAsLastSibling, SetAsFirstSibling)

|

4.6 부터 unity canvas 가 생기고 히어라이키에 순서에 따라 보여지는 order by layer 값이 달라짐..

맨 위에 위치한게 가장 위에 뿌려짐..


그러므로 히어라이키의 순서가 변경되는 api 가 중요해짐.


가장 마지막으로 순서 변경

Transform.SetAsLastSibling

Move the transform to the end of the local transfrom list.

가장 처음으로 순서 변경

Transform.SetAsFirstSibling

Move the transform to the start of the local transfrom list.

순서 설정(index 값)

Transform.SetSiblingIndex

Sets the sibling index.

현재 순서 반환(index 값)

Transform.GetSiblingIndex

Gets the sibling index.

Trackback 0 And Comment 0