06 2015 档案

JSBinding + SharpKit / Important Notes
摘要:Serialization of List<T> is not supported. About menu: Assets | JSB | Add SharpKit JsType Attribute for all Structs and Classes If you execute this me 阅读全文

posted @ 2015-06-20 23:21 AnswerWinner 阅读(359) 评论(0) 推荐(0)

JSBinding / Home
摘要:Description JSBinding is a tool enabling you to run actual javascript in Unity3D. It contains Mozilla SpiderMonkey JavaScript engine version 33 librar 阅读全文

posted @ 2015-06-20 22:18 AnswerWinner 阅读(1879) 评论(0) 推荐(0)

JSBinding / Run Samples
摘要:This document shows you how to run JSBinding 2048 sample in Editor. First of course, create an empty project and import JSBinding package. In Build Se 阅读全文

posted @ 2015-06-20 20:35 AnswerWinner 阅读(727) 评论(0) 推荐(0)

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 t 阅读全文

posted @ 2015-06-20 20:14 AnswerWinner 阅读(503) 评论(0) 推荐(0)

JSBinding + SharpKit / 原理篇:内存管理与垃圾回收
摘要:C# 和 JS 都有垃圾回收机制,需要保证 2 者能够分工协作。 类对象 类在C#中是引用类型。我们在 C# 中维护了2个map,保存 C# 对象和 JS 对象的一一对应关系。 举一个例子,看以下代码 从C#返回一个对象到 JS 以及后续的过程是这样的: 1) C# 获得一个表示JS对象的ID。 2 阅读全文

posted @ 2015-06-14 00:49 AnswerWinner 阅读(779) 评论(0) 推荐(0)

JSBinding + SharpKit / 原理篇:Delegate
摘要:以 NGUI 的 UIEventListener 为例: 有一个类: 这个类有一个 public UIButton btn; 变量,可以在 Inspector 里赋值。我们用这个类来响应 btn 的点击事件。重点就是第12行。 生成的JS如下: 看 JS代码 第14行,将 onClick 赋值为 $ 阅读全文

posted @ 2015-06-11 10:08 AnswerWinner 阅读(1182) 评论(0) 推荐(0)

导航