부모 오브젝트 변경(SetParent)

|
public void SetParent(Transform parent, bool worldPositionStays);

Parameters

parentThe parent Transform to use.
worldPositionStaysIf true, the parent-relative position, scale and rotation is modified such that the object keeps the same world space position, rotation and scale as before.

Description

Set the parent of the transform.

This method is the same as the parent property except that it's possible to make the Transform keep its local orientation rather than its global orientation by setting the worldPositionStays parameter to false.



두번째 인자 false 면 현재 transform 값 그대로 유지됨. ( 로컬포지션값이 그대로 유지 됨 -> 결국엔 부모 오브젝트에 따라 위치 

크기 등 변경.. 화면에 보이는 이미지가 변경)

첫번째 값 true면 transform 값 변경( 화면에 보이는 건 그대로 지만 로컬 포지션값이 변경됨)



Trackback 0 And Comment 0

자기 자신의 컴포넌트 혹은 그 위 부모의 컴포넌트 반환(제네릭)

|
Trackback 0 And Comment 0

br 태그.

|

xhtml 에서는 <br /> 이렇게 써주고 html5에서는 <br> 이렇게 써준다.


'웹관련' 카테고리의 다른 글

br 태그.  (0) 2014.12.23
주소체계와 데이터 정렬  (0) 2013.12.31
프로토콜  (0) 2013.12.31
윈도우 소켓  (0) 2013.12.31
소켓  (0) 2013.12.31
Trackback 0 And Comment 0