Unity3D/Tips

유니티 소소한 TIP

blueasa 2013. 4. 5. 01:09

화면에 커서를 보이거나 안보이게하기

Screen.showCursor = false;



화면의 가로/세로 크기값

Screen.width

Screen.height



해상도 설정하기

void Awake() {

 Screen.SetResolution(640, 480, true);

}



해상도 정보얻어오기

public Resolution[] resolutions = Screen.resolutions;



커서가 보이지 않고 움직이지 않게하기

Screen.lockCursor = true;



프로그램 종료하기

Application.Quit();



화면 캡쳐하기 (png 파일로만 되는거 같아요. 확실치는 않음 ㅎㅎ)

Application.CaptureScreenshot("Screenshot.png");



씬데이터 로딩 체크하기

 void Update() {

        if (Application.CanStreamedLevelBeLoaded(1))

            Application.LoadLevel(1);

        

    }


 

유니티 오쏘링모드에서 게임이 플레이 중인지 체크하기

Application.isPlaying




웹사이트로 링크걸기

Application.OpenURL ("http://unity3d.com/");



플랫폼(OS) 확인하기

Application.platform



실행중인 디바이스 확인하기(OS체크)

RuntimePlatform.OSXPlayer //맥

RuntimePlatform.WindowsPlayer // 윈도우

RuntimePlatform.WiiPlayer //닌텐도 위(wii)

RuntimePlatform.IPhonePlayer // 아이폰

RuntimePlatform.Android // 안드로이드

RuntimePlatform.XBOX360 // 엑스박스



PS3 //플레이스테이션



반응형