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

JSBinding + SharpKit / Home

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

标签:

Description

JSBinding is a great tool enabling you to run actual JavaScript in Unity3D. It contains Mozilla SpiderMonkey JavaScript engine version 33 library.

New version is expected to work with SharpKit (sharpkit.net). SharpKit is an open source tool which compiles C# scripts to JavaScript.

With JSBinding, the workflow in Unity3D is like this

  1. Do your work exactly like before: writing C# scripts, attaching C# scripts to GameObject, dragging reference to other MonoBehaviours or GameObjects in the Inspector, saving a prefab, etc.
  2. Use SharpKit to compile all C# scripts to JavaScript, use many tools in JSBinding to re-construct GameObjects, prefabs, finally, whole project becomes JavaScript version. The original C# scripts can fully be deleted from project.

What can you do with JSBinding

  1. Reusing existing JavaScript library. SharpKit also supports many JavaScript libraries, jQuery, etc.
  2. Updating new contents (including scripts) on iOS or other platforms. DLLs are not permitted to update on iOS platform. Text file is allowed. JavaScript file is text files, you can update JavaScript files like other resources (Models, Textures, Sounds, etc.). You both have C# version and JavaScript version game. When deploying game for desktop platform, such as Windows, you can directly use C# version and still have ability to update DLLs.

 

Features

  • Totally support Unity serialization. All public variables in MonoBehaviour will be correctly set when you are running JavaScript version game.
  • Full calling stack will be printed out whenever error occurs in JavaScript or C#.
  • Support JavaScript remote debugging from Firefox browser.
  • Every step of converting to JavaScript version can be achieved by clicking menu.
  • Support converting almost 99% syntax of C# (Generic types, arrays, ref/out, prarms key word, extension method, etc.).

 

Supported platforms

  • Windows Editor (32 and 64)
  • Windows Executable (32 and 64)
  • Mac OS X Editor (32 and 64)
  • Mac OS X Executable (32 and 64)
  • Android
  • iOS (32 and 64, works great with IL2CPP)

 

Documents list

JSBinding + SharpKit / run samples

JSBinding + SharpKit / Convert 2DPlatformer to JavaScript version

JSBinding + SharpKit / Generate JS Bindings

JSBinding + SharpKit / Setting up SharpKit project

JSBinding + SharpKit / Important Notes

JSBinding + SharpKit / Home

标签:

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

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