Platform Dependent Compilation

Platform Dependent Compilation

1、Platform Defines

  

2、在Project Setting -> Player 面板的Other Settings的Scripting Define Symbols可以自定义macro,在此片定义的macro会被所有代码引用。

  

  以分号分隔。

3、You can define your own preprocessor directives to control which code gets included when compiling. To do this you must add a text file with the extra directives to the "Assets/" folder. The name of the file depends on the language you are using, and the extension is .rsp:

  

  As an example, if you include the single line "-define:UNITY_DEBUG" in your smcs.rsp file the define UNITY_DEBUG will exist as a global define for C# scripts, except for Editor scripts.

  smcs.exe路径:...\Unity\Editor\Data\Mono\lib\mono\unity

参考:

1、file:///D:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/Manual/PlatformDependentCompilation.html

2、http://answers.unity3d.com/questions/351440/smcsexe-consistently-crashes.html

3、file:///D:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/Components/class-PlayerSettings40.html

Platform Dependent Compilation

时间: 2024-10-10 01:03:18

Platform Dependent Compilation的相关文章

how to solve "[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!"

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! Saw this warning message when using failsafe maven plugin, found the fix after a little search. add following to pom.xml <properties> <pro

Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

执行Maven Install打包的时候,提示以下警告信息: [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! 需要在<project>中添加<properties>标签: <properties> <project.build.sourceEncoding> UTF-8 </pro

maven工程中警告[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [警告]使用时平台编码格式(GBK actually)进行解析的文件资源,也就是说,构建是依赖于平台的! 错误原因:一些源文件的编码格式并不是工具平台的默认的解析格式,二者有冲突,所以报错 解决方法:在maven工程中的父工程POM中加入以下代码" <properties

警告:Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

执行Maven Install打包的时候,提示以下警告信息: [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! 解决:需要在pom.xml中的<project>中添加<properties>标签: <properties> <project.build.sourceEncoding> UT

Unity3D用户手册

Welcome to Unity. 欢迎使用Unity. Unity is made to empower users to create the best interactive entertainment or multimedia experience that they can. This manual is designed to help you learn how to use Unity, from basic to advanced techniques. It can be

Unity3D判断当前所在平台

Unity3D是一个跨平台的开发工具,支持的平台五花八门,常常开发一款游戏要发布到不同的平台,在不同的平台上会使用不同的代码,难道要我们各平台分别使用一套代码,单独编译一次吗?当然不用了,呵呵.    Unity3D有一个功能叫平台依赖编译(Platform Dependent Compilation),它可以让我们简单地使用if...else...对不同平台的代码进行区分,当我们切换一个发布平台重新编译时,Unity3D使用自动编译相应代码,从而省去了繁琐的操作.    下边举一个例子: 1

NGUI 基础知识

UIRoot 管理 scalePixelPerfect : 像素匹配,图片不会被缩放,除非屏幕高度小于 Minimum Height 或者大于 maximum  Height,如果那样的话,就使用 FixedSize. FixedSize : 图片都会被等比缩放. FixedSizeOnMobile : 意思是PC用 PixelPerfect,手机用 FixedSize. Sprite的各种类型 Simple: 简单的填充,缩放 Sliced: 九宫格,要设置好border Tiled: 重复平

几种Unity运行平台的判断

这里就介绍几种常见的,也是便于使用的几种平台判断的方法. 1.先说第一种,也是我用的顺手的一个.利用RuntimePlatform判断,API上的解释是[The platform application is running. Returned by Application.platform.] 举个栗子:if (Application.platform == RuntimePlatform.WindowsEditor)  { } 一般常用的是三个平台,安卓[Android],苹果[Iphone

Cross Platform Note: STD C++ Preprocessor directives &amp; pre-defined macros

ref: http://www.cplusplus.com/doc/tutorial/preprocessor/ concolusion: directives: #define #undef #include #if #else #elif #endif #ifdef #ifndef #error ( #warning is NOT A STANDARD DIRECTIVE,  since not shown in the page above, but most compilers have