码迷,mamicode.com
首页 > Web开发 > 详细

JSBinding + SharpKit / Generate JS Bindings

时间:2015-06-20 20:53:23      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:

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.

 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     }

 

Click this menu to export those classes:

技术分享

 

after finished, two parts of code will be generated:

1) C# files in folder Assets/JSBinding/Generated/ (defined by JSBindingSettings.csGeneratedDir variable)

技术分享

 

2) JavaScript files in folder StreamingAssets/JavaScript/Generated/ (defined by JSBindingSettings.jsGeneratedDir variable)

技术分享

 

Also, StreamingAssets/JavaScript/GeneratedFiles.javascript file is generated, containing the file name list.

 

JSBinding + SharpKit / Generate JS Bindings

标签:

原文地址:http://www.cnblogs.com/answerwinner/p/4590958.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!