JSBinding / Gen Bindings
Classes in JSBindingSettings.classes array will be exported to JavaScript.
There are already many classes (most of them are from UnityEngine.dll) in that array, you have to add your own classes, and maintain this array.
1 public static Type[] classes = new Type[]
2 {
3 /*
4 * Classes to export for demo
5 * Add classes here to export
6 */
7
8 typeof(UnityEngine.WheelCollider),
9 typeof(UnityEngine.PhysicMaterial),
10 typeof(UnityEngine.Collision),
11 typeof(UnityEngine.ControllerColliderHit),
12 typeof(UnityEngine.CharacterController),
13
14 //....
15 }
Add to JSBindingSetting.enums to export enums:
public static Type[] enums = new Type[]
{
typeof(KeyCode), // add here
};
Click this menu to export those classes:
Assets | JavaScript | Gen Bindings

NOTE: This menu must be executed when swiching to a different platform in Build Settings dialog!
after finished, two parts of code will be generated:
1) C# files in folder Assets/JSBinding/Generated/

2) JavaScript files in folder StreamingAssets/JavaScript/Lib/Gen.javascript (all in one)

back to JSBinding / Home
JSBinding / Gen Bindings的更多相关文章
- JSBinding+Bridge.NET:生成绑定(导出)
将框架代码导出到 JavaScript.就可以在 JavaScript 中调用 框架代码 的功能. 注意,这个功能是在 Js工程中做的,Cs工程没有这回事. 如何导出? 1. 将需要导出的类添加到 J ...
- JSBinding+Bridge.Net:框架代码与逻辑代码的关系
在JSB+Bridge工程中你可以同时维护Cs版本和Js版本的游戏. 框架代码:简称framework,表示那些不进行热更的代码.注意,这包括你自己写的代码,也包括引用的Dll,比如UnityEngi ...
- JSBinding+Bridge.NET:Unity游戏热更新方案
老版本链接如下:http://www.cnblogs.com/answerwinner/p/4469021.html 新用户不要再使用老版本了. 新版本 JSBinding 将抛弃 SharpKit ...
- JSBinding / FAQ & Trouble Shooting
Q: Why javascript file extension is .javascript?A: Because Unity treats .js files as Unity script an ...
- JSBinding / Home
Description JSBinding is a tool enabling you to run actual javascript in Unity3D. It contains Mozill ...
- JSBinding / Run Samples
This document shows you how to run JSBinding 2048 sample in Editor. First of course, create an empty ...
- JSBinding+SharpKit / 菜单介绍
- JSBinding + SharpKit / 编译 Cs 成 Js
轻轻一点菜单:[JSB | Compile Cs to Js] 主要产出:StreamingAssets/JavaScript/SharpkitGeneratedFiles.javascript,你的 ...
- JSBinding + SharpKit / 实战:转换 Survival Shooter
从 asset store 下载 Survival Shooter (商店里有2个版本,一种是给Unity5用的,一个是给Unity4.6用的,我们这个实验用的是后者,版本是2.2.如果) 1 删除多 ...
随机推荐
- hdu 1950 最长上升子序列
//Accepted 3540 KB 62 ms //dp 最长上升子序列 #include <cstdio> #include <cstring> #include < ...
- URAL 1306 Sequence Median(优先队列)
题意:求一串数字里的中位数.内存为1M.每个数范围是0到2的31次方-1. 思路:很容易想到把数字全部读入,然后排序,但是会超内存.用计数排序但是数又太大.由于我们只需要第n/2.n/2+1大(n为偶 ...
- openstack 本地化
研究了一下 openstack中的本地化:主要使用gettext模块: 其中本地化包括对一般字符串的本地化和log的本地化: (1) _localedir = os.environ.get('es ...
- Git 的安装和创建版本库 。
Git 的优点就不再多说了 .直接进入正题吧 . 安装Git 首先可以尝试输入 Git 看看有没有反映 . $ git The program 'git' is currently not insta ...
- PHP文件系统处理(二)
1.文件的打开和关闭(读文件中的内容,向文件中写内容) 读取文件中的内容 file_get_contents() //php5以上 < ...
- Training little cats_矩阵快速幂
Description Facer's pet cat just gave birth to a brood of little cats. Having considered the health ...
- Palindrome_滚动数组&&DP
Description A palindrome is a symmetrical string, that is, a string read identically from left to ri ...
- PE文件格式
以下内容摘录自<加密与解密>: 为了在PE文件中避免有确定的内存地址,出现了相对虚拟地址(RVA)的概念.RVA只是内存中的一个简单的相对于PE文件装入地址的偏移位置.它是一个“相对”地址 ...
- Js获取URL中的QueryStirng字符串
function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&] ...
- HDU 1082
http://acm.hdu.edu.cn/showproblem.php?pid=1082 这题开始想复杂了,error并不包括表达式本身不合法的情况 我的方法是遇到右括号就开始处理栈,如果开始最外 ...