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的更多相关文章

  1. JSBinding+Bridge.NET:生成绑定(导出)

    将框架代码导出到 JavaScript.就可以在 JavaScript 中调用 框架代码 的功能. 注意,这个功能是在 Js工程中做的,Cs工程没有这回事. 如何导出? 1. 将需要导出的类添加到 J ...

  2. JSBinding+Bridge.Net:框架代码与逻辑代码的关系

    在JSB+Bridge工程中你可以同时维护Cs版本和Js版本的游戏. 框架代码:简称framework,表示那些不进行热更的代码.注意,这包括你自己写的代码,也包括引用的Dll,比如UnityEngi ...

  3. JSBinding+Bridge.NET:Unity游戏热更新方案

    老版本链接如下:http://www.cnblogs.com/answerwinner/p/4469021.html 新用户不要再使用老版本了. 新版本 JSBinding 将抛弃 SharpKit ...

  4. JSBinding / FAQ & Trouble Shooting

    Q: Why javascript file extension is .javascript?A: Because Unity treats .js files as Unity script an ...

  5. JSBinding / Home

    Description JSBinding is a tool enabling you to run actual javascript in Unity3D. It contains Mozill ...

  6. JSBinding / Run Samples

    This document shows you how to run JSBinding 2048 sample in Editor. First of course, create an empty ...

  7. JSBinding+SharpKit / 菜单介绍

  8. JSBinding + SharpKit / 编译 Cs 成 Js

    轻轻一点菜单:[JSB | Compile Cs to Js] 主要产出:StreamingAssets/JavaScript/SharpkitGeneratedFiles.javascript,你的 ...

  9. JSBinding + SharpKit / 实战:转换 Survival Shooter

    从 asset store 下载 Survival Shooter (商店里有2个版本,一种是给Unity5用的,一个是给Unity4.6用的,我们这个实验用的是后者,版本是2.2.如果) 1 删除多 ...

随机推荐

  1. linux学习笔记3:linux的网络配置,rpm包,shell以及samba服务器的使用和安装

    1.linux下的shell<linux命令.编辑器和shell编程> (1)shell种类有很多,常用的有三种,在linux可以通过ls -l /bin/*sh 来显示所有已安装的she ...

  2. poj3356 dp

    //Accepted 4100 KB 0 ms //类似poj1080 //dp[i][j]表示s1用前i个,s2用前j个的最少匹配步数 //dp[i][j]=min(dp[i][j-1]+1,dp[ ...

  3. How To Create A Struts 2 Web Application

    以简单登录为例 1.创建一个Dynamic Web projec项目记得勾选Generate web.xml deployment dsecriptor 2.引入Struts 2工程所需运行库文件 解 ...

  4. GPRS Sniffing Tutorial

    - Download sources into ~/gprs_sniffer git clone git://git.osmocom.org/osmocom-bb.git git clone git: ...

  5. ios上 更改 状态栏(UIStatusBar)

    摘要 ios上 更改状态栏(UIStatusBar)的颜色 ios UIStatusBar statusBar 状态栏 更改状态栏颜色 目录[-] IOS上 关于状态栏的相关设置(UIStatusBa ...

  6. 浅谈Android应用性能之内存

    本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 文/ jaunty [博主导读]在Android开发中,不免会遇到许多OOM现象,一方面可能是由于开 ...

  7. iOS 难题解决日志------2层控制器 上面的控制器显示透明

     f ([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0) { nextVC.modalPresentationStyle=U ...

  8. 收集Magento FAQ常见问题处理办法

    问题:Magento如何下载? 解答:Magento的英文官方下载地址为:http://www.magentocommerce.com/download 注意:需要注册后才可以下载,而且请下载完整版本 ...

  9. Git命令整理

    说在前面: 刚开始在实习时接触git,是用git可视化工具,但是仅限于克隆库.切换分支.抓取和推送,对于其中的原理不甚了解.看了廖雪峰老师Git教程,获益颇丰.特别要感谢我工作中的同事,是他强烈建议我 ...

  10. 【avalon源码】

    1. document.getElementsByTagName('head')[0] document.head 2. 3. var IEVersion = NaN if (window.VBArr ...