일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 변경된 정보
- tcp
- tcp네트워크
- 나지보 특성
- 어플
- 아이패드
- 스랄 특성
- Collection Framework
- 에셋
- 아이폰
- 히오스
- unity
- TCP 네트워크 방식의 연결
- 벨팡
- 안드로이드
- game
- 나지보
- 안드로이드 Application Lifecycle
- 소캣(Socket)
- php 홈디렉토리 변경방법
- 포트(Port)
- 명령어
- 리눅스
- End of Darkness
- 집 정리
- 기업의 행포
- 게임
- 컬렉션 프레임
- 비행기 모드
- 자바
- Today
- Total
Do Something IT
[unity] 컴파일시 플랫폼 구분 방법 본문
전처리 소스 구분 코드
#if (UNITY_ANDROID || UNITY_IPHONE)
폰용 소스
#else
다른 플랫폼 소스
#endif
위와 같이 전처리기를 이용해서 컴파일 할 때 해당되는 소스를 아에 인식못하게 하는 방법이 있습니다.
유니티의 전처리기에서 플랫폼을 구분하는 값은 다음과 같습니다.
//// UNITY_EDITOR Define for calling Unity Editor scripts from your game code.
//// UNITY_STANDALONE_OSX Platform define for compiling/executing code specifically for Mac OS (This includes Universal, PPC and Intel architectures).
//// UNITY_DASHBOARD_WIDGET Platform define when creating code for Mac OS dashboard widgets.
//// UNITY_STANDALONE_WIN Use this when you want to compile/execute code for Windows stand alone applications.
//// UNITY_WEBPLAYER Platform define for web player content (this includes Windows and Mac Web player executables).
//// UNITY_WII Platform define for compiling/executing code for the Wii console.
//// UNITY_IPHONE Platform define for compiling/executing code for the iPhone platform.
//// UNITY_ANDROID Platform define for the Android platform.
//// UNITY_PS3 Platform define for running Play Station 3 code.
//// UNITY_XBOX360 Platform define for executing XBbox 360 code.
비전처리 소스
function Start () {
if (Application.platform == RuntimePlatform.WindowsPlayer)
print ("Do something special here!");
}
OSXEditor | Mac OS X에서 일치 편집기에서 . |
OSXPlayer | Mac OS X의 플레이어에서 |
WindowsPlayer | 윈도우에서 플레이어에서 . |
OSXWebPlayer | Mac OS X에서 웹 플레이어에서 . |
OSXDashboardPlayer | Mac OS X에서 대시보드 위젯 있음 . |
WindowsWebPlayer | Windows에서 웹 플레이어에서. |
WiiPlayer | 닌텐도 Wii의 플레이어에서 . |
WindowsEditor | 윈도우에서 일치 편집기에서 . |
IPhonePlayer | 아이폰에있는 플레이어에서 . |
XBOX360 | XBOX360에서 플레이어에서 |
PS3 | 플레이 스테이션 3의 플레이어에서 |
Android | 안드로이드 장치에서 플레이어에서 . |
'Unity3D' 카테고리의 다른 글
[unity3d] 내브메쉬(Navmesh)와 경로찾기(Pathfinding) (Pro 전용) (0) | 2013.01.02 |
---|---|
[Unity3d]NGUI (0) | 2012.11.18 |
[unity] loding Progress base logic (0) | 2012.10.08 |
[UNITY3D] 유니티 STL (0) | 2012.09.10 |
[unity3d] Unity3D에서 Jar 읽기 , Export 하기 ( Mac 에서 ) (4) | 2012.07.24 |