Plugins in Unity
【Plugins in Unity】
In Unity, you normally use scripts to create functionality but you can also include code created outside Unity in the form of aPlugin. There are two kinds of plugins you can use in Unity: Managed plugins and Native plugins.
Managed plugins is accessible to the standard .NET tools that Unity uses to compile scripts.
Native plugins are not accessible to Unity’s tools in the way that managed libraries are.
Unity has extensive support for Plugins, which are libraries of native code written in C, C++, Objective-C, etc. Plugins allow your game code (written in Javascript, C# or Boo) to call functions from these libraries. This feature allows Unity to integrate with middleware libraries or existing C/C++ game code.
Note: For security reasons, plugins are not usable with webplayers.
In order to use a plugin you need to do two things:
- Write functions in a C-based language and compile them into a library.
- Create a C# script which calls functions in the library.
The plugin should provide a simple C interface which the C# script then exposes to other user scripts. It is also possible for Unity to call functions exported by the plugin when certain low-level rendering events happen (for example, when a graphics device is created).
参考:http://docs.unity3d.com/Manual/Plugins.html
Plugins in Unity的更多相关文章
- Gvr SDK for Unity 分析(二)
前言 关于google vr sdk的具体使用,传送门 Gvr SDK for Unity 分析(一) Google Daydream平台已经整合进Google VR SDK 本文环境:Unity5. ...
- 怎么给Unity写一个原生的插件
本文章由cartzhang编写,转载请注明出处. 所有权利保留. 文章链接:http://blog.csdn.net/cartzhang/article/details/50266889 作者:car ...
- linux mint & ubuntu 安装QQ国际版
ubuntu安装QQ相对简单 下载qq国际版deb文件,直接安装即可. 下载地址: http://pan.baidu.com/s/1hqmYzlU 下面就重点说一下linux mint 安装qq. 1 ...
- Unity 特殊文件夹 Assets Resources StreamingAssets Editor Plugins......
AssetsAssets文件夹是unity项目中放置游戏资源的主文件夹. 该文件夹中的内容将直接反应在编辑器的Project视口中.许多系统API基于该文件夹路径. ResourcesUnity允许你 ...
- Unity 使用Plugins接入安卓SDK 基础篇
一.须知 本帖适合对安卓一点基础都没有,有一定Unity基础.刚刚接完一个某文档很简单的渠道SDk,也当是自己总结一下. 二.Unity中的目录创建与理解. Plugins:插件目录,该目录再编译项目 ...
- Unity Plugins的使用方法
一.为插件设置平台的方法 unity5之前,是通过把插件搞到对应目录进行区分平台的(比如在build target是ios平台时只把IOS目录的插件build进去),unity5之后提供了设置平台/c ...
- Unity插件之Unity调用C#编译的DLL
Unity插件分为两种:托管插件(Managed Plugins)和本地插件(Native Plugins).本文先来说说Unity中的托管插件,本地插件的文章留到下一篇文章再说. 有时候我们会有这样 ...
- Unity中脚本的执行顺序总结(@WhiteTaken)
(Editor)以上是Unity官方文档中的截图,脚本在被挂载到物体上,会启用Editor的方法Reset. (Initialization)当执行脚本开始,初始化的过程中,依次执行的是Awake-& ...
- Unity 最佳实践
转帖:http://www.glenstevens.ca/unity3d-best-practices/ 另外可以参考:http://devmag.org.za/2012/07/12/50-tips- ...
随机推荐
- 实用且堪称神器的Chrome插件推荐
前言 相信很多人都在使用 Chrome 浏览器,其流畅的浏览体验得到了不少用户的偏爱,但流畅只是一方面, Chrome 最大的优势还是其支持众多强大好用的扩展程序(Extensions).最近为了更好 ...
- JavaScript:基本包装类型
为了方便操作,JavaScript提供了3个特殊的引用类型:Boolean.Number和String.实际上,每当读取一个基本类型值的时候,后台就会创建一个对应的基本包装类型的对象,从而可以调用这些 ...
- 40+个对初学者非常有用的PHP技巧
1.不要使用相对路径,要定义一个根路径 这样的代码行很常见: require_once('../../lib/some_class.php'); 这种方法有很多缺点: 它首先搜索php包括路径中的指定 ...
- cocos2d js jsb XMLHttpRequest 中文乱码
1.首先讲下怎样使用XMLHttpRequest 下面所说的是在cocos2d-x 2.2.2 或者 2.3 版本号中. 首先要明确cocos2d js事实上分两个版本号,一个是html5的版本号,另 ...
- 基于C#的UDP协议的同步实现
一.摘要 总结基于C#的UDP协议的同步通信. 二.实验平台 Visual Studio 2010 三.实验原理 UDP传输协议同TCP传输协议的区别可查阅相关文档,此处不再赘述. 四.实例 4.1 ...
- ThinkPHP5 为什么取消了单字母函数?
ThinkPHP5 为什么取消了单字母函数? 更容易理解. 理加规范. 个人喜好. 比如 TPShop 也是用 ThinkPHP5 又加回单字母函数. [话唠]教练,我想做菜-长沙 2018/10/8 ...
- 安装Zookeeper(单机版)
一.解压和重命名 tar -zxvf zookeeper-3.4.8.tar.gz -C /usr/ cd /usr mv zookeeper-3.4.8 zookeeper 二.设置配置文件 cd ...
- DataOutput接口实现类有:
FSDataOutputStream final FSDataOutputStream create = fs.create(path);
- C语言中可变形参简单实例
以下程序主要包括三个主要函数: 一个最简单的可变形参函数实例: 一个简单的printf功能的实例: 一个打印字符串函数(辅助): 其中myPrintf函数,实现了printf的部分简单功能,并没有去实 ...
- bzoj4336: BJOI2015 骑士的旅行
Description 在一片古老的土地上,有一个繁荣的文明. 这片大地几乎被森林覆盖,有N座城坐落其中.巧合的是,这N座城由恰好N-1条双 向道路连接起来,使得任意两座城都是连通的.也就是说,这些城 ...