// Use this for initialization
public void Init()
{
// Position Remember
Screen_Size = new Vector2(this.GetComponent<RectTransform>().sizeDelta.x, this.GetComponent<RectTransform>().sizeDelta.y);
Position_Transform = new Vector2(this.GetComponent<RectTransform>().anchoredPosition.x, this.GetComponent<RectTransform>().anchoredPosition.y);
Earth_Rotate = new Vector3(0.0f, 0.0f, 0.5f);
// Detecting memory leak
ExceptionManager.Process_Test("SizeManager->Screen_Size");
ExceptionManager.Process_Test("SizeManager->Position_Transform");
}
// Use this for initialization
public void Resize_Transform()
{
// 1080 * 1920 (9:16) is basic setting
// Processing
this.GetComponent<RectTransform>().sizeDelta = new Vector2((Screen.width * Screen_Size.y) / 1080, (Screen.width * Screen_Size.y) / 1080);
this.GetComponent<RectTransform>().anchoredPosition = new Vector2((Screen.width * Position_Transform.x) / 1080, (Screen.height * Position_Transform.y) / 1920);
this.gameObject.SetActive(true);
// Detecting memory leak
ExceptionManager.Process_Test("SizeManager->sizeDelta");
ExceptionManager.Process_Test("SizeManager->anchoredPosition");
}
이미지 크기에 따른 크기 제조정 함수 구현
'★ 개인 공간 > [PG]Katsune' 카테고리의 다른 글
[스크랩] 유니티 이미지 최적화 (0) | 2018.12.09 |
---|---|
12.07 작업내역! (4) | 2017.12.07 |
유니티 삼각형 매쉬 그리는법 ( 유니티 삼각형 충돌체크 ) (0) | 2015.11.30 |
2015-11-03 작업일지. 백업 (0) | 2015.11.03 |
2015-11-02 작업일지. 백업 (0) | 2015.11.02 |