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 这个预处理指令.然后回想一下工作, 发现这个指令使用场景还是很多的.比如: 一个项目的模块儿之多,源文件之大,代码之多, ...
随机推荐
- Qt搭建多线程Server
起因是MySQL在Android上没有驱动.也就是说,移动端想要访问远程数据库,必须通过一台(或多台)PC进行中转. 中转PC作为Server,接受来自移动端Socket访问数据库的要求,Server ...
- CentOS6.4 安装MongoDB
1.下载MongoDB(64位) http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.9.tgz 或 http://pan.baidu.c ...
- BZOJ4552: [Tjoi2016&Heoi2016]排序
Description 在2016年,佳媛姐姐喜欢上了数字序列.因而他经常研究关于序列的一些奇奇怪怪的问题,现在他在研究一个难题 ,需要你来帮助他.这个难题是这样子的:给出一个1到n的全排列,现在对这 ...
- Compound Words
题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=91209#problem/C 题意: 有一堆按照字典序排好的字符串,问你有多 ...
- document.body.scrollTop or document.documentElement.scrollTop
用Javascript获取DOM节点相对于页面的绝对坐标时,需要计算当前页面的滚动距离,而这个值的获取又取决于浏览器. 在Firefox或Chrome浏览器的控制台可以查看document.bod ...
- shell 常用正则
shell常用正则表达式 “^\d+$” //非负整数(正整数 + 0) “^[0-9]*[1-9][0-9]*$” //正整数 “^((-\d+)|(0+))$” //非正整数(负整数 ...
- linux中添加ftp用户,并设置相应的权限
在linux中添加ftp用户,并设置相应的权限,操作步骤如下: 1.环境:ftp为vsftp.被限制用户名为test.被限制路径为/home/test 2.建用户:在root用户下: useradd ...
- Mysql和Oracle数据库concat()函数
一.函数的使用参数不同 Mysql支持多个字符串拼接: CONCAT(str1,str2,-) Oralce只支持两个字符串的拼接,若想拼接多个字符串可以嵌套使用concat CONCAT(str1, ...
- BizTalk动手实验(九)业务规则引擎使用
1 课程简介 通过本课程熟悉业务规则引擎(BRE)的使用(本环境为Windows 2008 32位操作系统环境 + Visual Studio 2010 + BizTalk 210) 2 准备工作 1 ...
- eclipse创建web项目
总结为3步: 必备环境: Eclipse jee Tomcat 1.创建services 2.创建dynamic web project项目 3.WebContent路径下创建index.jsp 运行 ...