[유니티] Parent 대입 경고 수정

Programming/Unity|2019. 3. 25. 08:19
반응형


Parent of RectTransform is being set with parent property. Consider using the SetParent method instead, with the worldPositionStays argument set to false. This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.


구글 번역:

RectTransform의 부모가 parent 속성으로 설정됩니다. 대신 worldPositionStays 인수를 false로 설정하여 SetParent 메서드를 사용하는 것이 좋습니다. 이는 일반적인 UI 스케일링 문제를 방지 할 수있는 세계의 방향 및 규모보다는 지역 방향 및 규모를 유지합니다.


parent 에 대입을 하면 위와 같은 warning 나서, 아래 사진 처럼 Set 을 통해 값을 세팅해주니 해결됐다.



반응형

댓글()