2014년 3월 19일 수요일

[Unity3D]transform.find, findChild 가 원하는 게임오브젝트를 찾지 못할때


원인은 알수없으나 찾고자 하는 게임오브젝트의 깊이가 너무 깊을때

찾지 못하는 현상이 있다 이를 해결하기 위해선 전체경로를 사용해준다

Transform LeftHandThumb1 = transform.FindChild("Root/Spine/Spine1/Spine2/LeftShoulder/LeftArm/LeftForeArm/LeftHand/LeftHandThumb1");

Transform RightHandThumb1 = transform.Find("Root/Spine/Spine1/Spine2/RightShoulder/RightArm/RightForeArm/RightHand/RightHandThumb1");

댓글 없음:

댓글 쓰기