「Unity/os判定」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「 #if UNITY_EDITOR #elif UNITY_IPHONE if (SystemInfo.deviceModel.Contains ("iPad")) { } #elif UNITY_ANDROID #endif」) |
|||
行1: | 行1: | ||
− | |||
#if UNITY_EDITOR | #if UNITY_EDITOR | ||
+ | // unity_editer | ||
#elif UNITY_IPHONE | #elif UNITY_IPHONE | ||
if (SystemInfo.deviceModel.Contains ("iPad")) { | if (SystemInfo.deviceModel.Contains ("iPad")) { | ||
+ | // iPad | ||
+ | } else { | ||
+ | // iPhone | ||
} | } | ||
#elif UNITY_ANDROID | #elif UNITY_ANDROID | ||
+ | // Android | ||
#endif | #endif |
2018年3月19日 (月) 12:08時点における版
#if UNITY_EDITOR // unity_editer #elif UNITY_IPHONE if (SystemInfo.deviceModel.Contains ("iPad")) { // iPad } else { // iPhone } #elif UNITY_ANDROID // Android #endif