Unity3D 系统宏
Platform Defines
The platform defines that Unity supports for your scripts are:
| Property: | Function: |
|---|---|
| UNITY_EDITOR | #define directive for calling Unity Editor scripts from your game code. |
| UNITY_EDITOR_WIN | #define directive for Editor code on Windows. |
| UNITY_EDITOR_OSX | #define directive for Editor code on Mac OSX. |
| UNITY_STANDALONE_OSX | #define directive for compiling/executing code specifically for OS X (including Universal, PPC and Intel architectures). |
| UNITY_STANDALONE_WIN | #define directive for compiling/executing code specifically for Windows standalone applications. |
| UNITY_STANDALONE_LINUX | #define directive for compiling/executing code specifically for Linux standalone applications. |
| UNITY_STANDALONE | #define directive for compiling/executing code for any standalone platform (OS X, Windows or Linux). |
| UNITY_WII | #define directive for compiling/executing code for the Wii console. |
| UNITY_IOS | #define directive for compiling/executing code for the iOS platform. |
| UNITY_IPHONE | Deprecated. Use UNITY_IOS instead. |
| UNITY_ANDROID | #define directive for the Android platform. |
| UNITY_PS3 | #define directive for running PlayStation 3 code. |
| UNITY_PS4 | #define directive for running PlayStation 4 code. |
| UNITY_SAMSUNGTV | #define directive for executing Samsung TV code. |
| UNITY_XBOX360 | #define directive for executing Xbox 360 code. |
| UNITY_XBOXONE | #define directive for executing Xbox One code. |
| UNITY_TIZEN | #define directive for the Tizen platform. |
| UNITY_TVOS | #define directive for the Apple TV platform. |
| UNITY_WP_8 | #define directive for Windows Phone 8. |
| UNITY_WP_8_1 | #define directive for Windows Phone 8.1. |
| UNITY_WSA | #define directive for Windows Store Apps. Additionally, NETFX_CORE is defined when compiling C# files against .NET Core. |
| UNITY_WSA_8_0 | #define directive for Windows Store Apps when targeting SDK 8.0. |
| UNITY_WSA_8_1 | #define directive for Windows Store Apps when targeting SDK 8.1. |
| UNITY_WSA_10_0 | #define directive for Windows Store Apps when targeting Universal Windows 10 Apps. Additionally WINDOWS_UWP and NETFX_CORE are defined when compiling C# files against .NET Core. |
| UNITY_WINRT | Equivalent to UNITY_WP_8 | UNITY_WSA. |
| UNITY_WINRT_8_0 | Equivalent to UNITY_WP_8 | UNITY_WSA_8_0. |
| UNITY_WINRT_8_1 | Equivalent to UNITY_WP_8_1 | UNITY_WSA_8_1. This is also defined when compiling against Universal SDK 8.1. |
| UNITY_WINRT_10_0 | Equivalent to UNITY_WSA_10_0 |
| UNITY_WEBGL | #define directive for WebGL. |
| UNITY_ADS | #define directive for calling Unity Ads methods from your game code. Version 5.2 and above. |
| UNITY_ANALYTICS | #define directive for calling Unity Analytics methods from your game code. Version 5.2 and above. |
| UNITY_ASSERTIONS | #define directive for assertions control process. |
Also you can compile code selectively depending on the version of the engine you are working on. Currently the supported ones are:
| UNITY_2_6 | Platform define for the major version of Unity 2.6. |
| UNITY_2_6_1 | Platform define for specific version 1 from the major release 2.6. |
| UNITY_3_0 | Platform define for the major version of Unity 3.0. |
| UNITY_3_0_0 | Platform define for the specific version 0 of Unity 3.0. |
| UNITY_3_1 | Platform define for major version of Unity 3.1. |
| UNITY_3_2 | Platform define for major version of Unity 3.2. |
| UNITY_3_3 | Platform define for major version of Unity 3.3. |
| UNITY_3_4 | Platform define for major version of Unity 3.4. |
| UNITY_3_5 | Platform define for major version of Unity 3.5. |
| UNITY_4_0 | Platform define for major version of Unity 4.0. |
| UNITY_4_0_1 | Platform define for major version of Unity 4.0.1. |
| UNITY_4_1 | Platform define for major version of Unity 4.1. |
| UNITY_4_2 | Platform define for major version of Unity 4.2. |
最新Unity3D系统宏地址:http://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html
Unity3D 系统宏的更多相关文章
- Objective-C中系统宏的用法总结
先说一下本文中会提到的内容:##,__VA_ARGS__, __FILE__, __LINE__ , __FUNCTION__等 宏变量: 先举一个例子,会用到上面这些宏: #define mypri ...
- Ruby操作VBA的注意事项和技巧(2):宏里调用和控制窗体以及窗体上的控件、不同workbook之间的宏互相调用
4.宏里调用并控制窗体以及窗体上的各种控件 1 Sub Criterion_Check() 2 If Workbooks.count = 0 Then '如果当前没有打开的工作薄的话需要发出警告 3 ...
- [原]Unity3D深入浅出 - 常见三维软件与Unity3D的单位比例
Unity3d系统默认单位是米 Maya:Unity3D 1M:100M 3DMax:Unity3D 100M:1M Cinema 4D:Unity3D 1M:100M Lightwavew:Uni ...
- iOS:PrefixHeader / 头文件 / 宏定义(18-03-02更)
宏定义,不一定放在PCH文件,可能放在一个.h文件,再用PCH包含进来. 1.屏幕尺寸 // 屏幕尺寸 #define kSCREEN_WIDTH [UIScreen mainScreen].boun ...
- C++通过宏定义判断操作系统及编译器
INTRODUCTION: C++的编译环境千奇百怪,很多时候一些代码在某些编译环境下可用,一旦移到其他环境下,就会干脆Compile Error 对此,我们可以使用C++的宏定义来判断操作系统,从而 ...
- linux系统编程之进程(四)
今天继续研究进程相关的东东,话不多说,进入正题: SIGCHLD: 关于它,之前章节的学习中已经用到了,具体可以参考博文:http://www.cnblogs.com/webor2006/p/3500 ...
- 痞子衡嵌入式:IAR内部C-SPY调试组件配套宏文件(.mac)用法介绍
大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家分享的是IAR内部C-SPY调试组件配套宏文件(.mac)用法. 痞子衡之前写过一篇 <JLink Script文件基础及其在IAR下调用 ...
- C语言之预处理
这是2016年的最后一篇博客,年初定的计划是写12篇博客,每月一篇,1/3转载,2/3原创,看来是实现不了了! -- 题外话.今天要写的东西是C语言中的预处理器,我们常说的宏定义的用法.为什么要写这个 ...
- C/C++预处理指令#define,#ifdef,#ifndef,#endif…
2016年12月29日更新: 今天查看以前文件的时候, 突然发现了#error 这个预处理指令.然后回想一下工作, 发现这个指令使用场景还是很多的.比如: 一个项目的模块儿之多,源文件之大,代码之多, ...
随机推荐
- 20145304 Java第七周学习报告
20145304<Java程序设计>第七周学习总结 教材学习内容总结 1.时间的度量: 格林威治标准时间(GMT)通过观察太阳而得,其正午是太阳抵达天空最高点之时,因地球的公转与自传,会造 ...
- Codeforces Round #235 (Div. 2) B. Sereja and Contests
#include <iostream> #include <vector> #include <algorithm> using namespace std; in ...
- Weka使用介绍
(转) http://baidutech.blog.51cto.com/4114344/1033714/ 1.简介 数据挖掘.机器学习这些字眼,在一些人看来,是门槛很高的东西.诚然,如果做算法实现甚至 ...
- The Bus Driver Problem
题目连接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=90648#problem/G 题意: 给每位司机分配一个白天和晚上的行车路线, ...
- 用脚本来简化iOS美术同学的工作
用脚本来简化iOS美术同学的工作 问题 我们知道,在 iOS 开发中,为了使我们的 app 能够同时支持 iPhone 的 Retina 屏幕和普通屏幕,美术同学需要对 UI 设计稿中的每个元素进行 ...
- java实现MD5加密
mport java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Creat ...
- JQuery类型转换
来自:http://blog.csdn.net/kfanning/archive/2010/04/14/5485412.aspx 转换成数字 ECMAScript提供了两种把非数字的原始值转换成数字的 ...
- 【HDU 4747 Mex】线段数
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4747 题意:有一组序列a[i](1<=i<=N), 让你求所有的mex(l,r), mex ...
- NeuSoft(1)构建嵌入式交叉编译环境
操作系统版本:ubuntu 12.04 内核名称:Linux 内核发行版:3.2.0-generic 内核版本:#50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011 ...
- php全面获取url地址栏及各种参数
<?php echo $_SERVER['HTTP_HOST']."<br>";//获取域名或主机地址 echo $_SERVER["SERVER_PO ...