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 删除多 ...
随机推荐
- Javascript计数器
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content=&q ...
- Netstat命令(一)
一.查看那些端口号被占用,在命令行中录入:netstat -an ,下图已查找80端口为例 二.查看哪个程序在使用80端口 三.查看占用80端口所对应的PID号 四.打开任务管理器,可以根据PID号找 ...
- 一篇文章教你学会基础的HTML
html是学习做网页的基础,漂亮的网页与布局就是由有些html代码组成,大家看完这篇文章就可以简单的了解html了,多写多练 如果你不致力于成为美工的话,那么作为开发人员,可以读懂HTML.必 ...
- JS中阻止默认事件与事件冒泡
JQuery 提供了两种方式来阻止事件冒泡. 方式一:event.stopPropagation(); $("#div1").mousedown(function(event){ ...
- osgearth+vs2010安装
转自:http://www.cnblogs.com/eaglezhao/archive/2011/09/26/2192389.html OSGEARTH + VS2010 安装 *VS 平台不重要,本 ...
- Spring中配置文件applicationContext.xml配置详解
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.spr ...
- Get start with Android development
Firstly we should install the right version of JDK and JRE, there are two version of ADK for differe ...
- JAVA的第一个程序
关于下载安装环境变量的配置网上的教程已经很多了 . 下面附上第一个HelloWorld的代码 /** 这是我的第一个java程序 */ public class HelloWorld { public ...
- BZOJ 3450 Easy
注意细节啊... 和上一道差不多. #include<iostream> #include<cstdio> #include<cstring> #include&l ...
- 开启Ubuntu php错误提示 ZT
开启Ubuntu php错误提示 在Ubuntu下,LAMP中PHP错误是不提示的,只会出现一个空白页.当然,这对于运行的生产环境来说是必须的.但有时候也需要查看生产环境上错误提示,那么只要通用下面简 ...