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 这个预处理指令.然后回想一下工作, 发现这个指令使用场景还是很多的.比如: 一个项目的模块儿之多,源文件之大,代码之多, ...
随机推荐
- PE-1 & 暴模|容斥
题意: 求1000以下3或5的倍数之和. SOL: 暴模也是兹瓷的啊... 那么就想到了初赛悲催的滚粗...容斥忘了加上多减的数了... 然后对着题...T = 3*333*(1+333)/2 + 5 ...
- ACM: 畅通工程-并查集-解题报告
畅通工程 Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description 某省调查城镇交通状况 ...
- BZOJ 1054 题解
1054: [HAOI2008]移动玩具 Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 1888 Solved: 1035[Submit][Stat ...
- 李洪强iOS经典面试题130
绘图与动画 CAAnimation的层级结构 CAPropertyAnimation是CAAnimation的子类,也是个抽象类,要想创建动画对象,应该使用它的两个子类:CABasicAnimatio ...
- ThinkPHP留后门技巧
原文链接:https://www.leavesongs.com/PENETRATION/thinkphp-callback-backdoor.html 90sec上有人问,我说了还有小白不会用.去年我 ...
- oracle函数,查询,事务
函数包括:单行函数,多行函数(分组函数) 数值函数: --绝对值 select abs(-12.3) from dual; --向上取值 select ceil(5.3) from dual; --向 ...
- EDI - Biztalk Setting
1. Applications:
- BizTalk开发系列(五) 属性字段
在根据消息内容进行路由的时候经常使用的是可分辨字段和属性字段.属性字段可以在各个 BizTalk Server 组件(包括管道和业务流程)中进行访问.属性字段还可用于消息路由.如果需要在上下文(而不是 ...
- jQuery判断元素是否存在方法总结
在jquery中判断元素是否存在我们可使用$("#div").length > 0)来判断了,意思就是判断元素长度了,如果没有肯定是不存在的哦,下面我来介绍介绍. 使用传统j ...
- 【转】NumPy-快速处理数据
2.0 简介 标准安装的Python中用列表(list)保存一组值,可以用来当作数组使用,不过由于列表的元素可以是任何对象,因此列表中所保存的是对象的指针(为了保存各种类型的对象,只能牺牲空间).这样 ...