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. python——周边

    Pythonic的禅意 import this python是用c语言写的.传说python不止有C语言实现,还有java实现,还有python实现的python,甚至还有js实现的python. p ...

  2. 学习js之类的使用

    <script language="javascript">function Person(){    }Person.prototype={    name:null ...

  3. Ubuntu 14.10 下安装java反编译工具 jd-gui

    系统环境,Ubuntu 14.10 ,64位 1 下载JD-GUI,网址http://221.3.153.126/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/jd.benow.ca/ ...

  4. hdu 2097

    ps:WA了两次好像....Sky数是三个进制下的各位数之和相等...而不是都等于22...我傻逼了... 代码: #include "stdio.h" int inp(int a ...

  5. IIS6的session丢失问题

    解决办法:      a IIS6中相比IIS5增加了一个应用程序池,默认是使用DefaultAppPool.      b   先为站点建立一个应用程序池,打开IIS管理器,右键点击应用程序池-新建 ...

  6. iOS开发之修改动画对象的元素属性

    步骤:1.使用single view application创建新的项目 2.在.h文件中使用UIimageview创建两个图片实例对象,使用UIDynamicAnimator创建动画对象 3.在.m ...

  7. 详解定位—>"position"

    position是css中一个重要的属性,他规定元素的定位类型,默认值为static,他的值有5种,absolute,fixed,relative,static,inherit.接下来将详细具体对每一 ...

  8. Interview----最长连续乘积字串

    题目描述: 给一个浮点数序列,取最大乘积连续子串的值,例如 -2.5,4,0,3,0.5,8,-1,则取出的最大乘积连续子串为3,0.5,8. 也就是说,上述数组中,3 0.5 8这3个数的乘积3*0 ...

  9. JQuery源码分析(四)

    jQuery多库共存处理 多库共存换句话说可以叫无冲突处理. 总的来说会有2种情况会遇到: 1.$太火热,jQuery采用$作为命名空间,不免会与别的库框架或者插件相冲突. 2.jQuery版本更新太 ...

  10. HDU 4888 (网络流)

    Poroblem Redraw Beautiful Drawings (HDU4888) 题目大意 一个n行m列的矩形,只能填0~k的数字. 给定各行各列的数字和,判定有无合法的方案数.一解给出方案, ...