Unity3d Stealth 에서 사용되는 Animator 관리( HashID)

|

HashID 를 사용해서 Animaotr 를 관리 할수 있다.

각 Animaotr 의 Animation 및 paramerator 값등을 StringToHash로 받아와서 그 값을 이용해서 애니메이션을 제어 할수 있다.


Animation 같은 경우 레이어명.애니메이션 이름으로 받아올수 있고

Parameters 같은 경우 이름명으로 받아올수 있음.








Trackback 0 And Comment 0

unity3d Stealth 코딩 스타일(Tag 를 사용)

|

이런식으로 태그로 등록된 값들을 태그 리스트에 저장을 하고 외부에서 
GameObject.FindGameObjectWithTag API를 사용해서 해당 태그로 지정된 게임 오브젝트를 찾을수 있다.


Trackback 0 And Comment 0

히어라이키 순서 변경(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