JSBinding / FAQ & Trouble Shooting
2016-07-06 21:34
549 查看
Q: Why javascript file extension is .javascript?
A: Because Unity treats .js files as Unity script and will try to compile it.
Q: Does JSBinging support javascript debugging?
A: No. We did support debugging in old versions, but it's very hard to use.
Q: Unity says "DllNotFoundException"?
A:
If you are not on Windows, this is a bug, contact: answerwinner@gmail.com
If you are on Windows:
For Unity editor: copy DLL to unity install directory:
for 32bit editor: copy Assets/Plugins/x86/mozjs-31.dll to UnityInstallDir/Editor folder
for 64bit editor: copy Assets/Plugins/x86_64/mozjs-31.dll to UnityInstallDir/Editor folder
For Windows exe: you have to copy(or move) mozjs-31.dll to the folder containing .exe.
Problem still exists? Make sure you have "msvcr110.dll" in "C:\windows\system32". (the dll was built in visual studio 2012). If not, try install microsoft vc2012 runtime.
Q: Does JSBinding package contain full source?
A: Yes. Both C# and C code. Every single line of code is in your hand.
Q: Unity reports 100+ errors
A: Please locate at the first warning or error, that's the real error!
Q: Unity reports warning 'xxx was not found with (with IgnoreNamespace)'
A: Make sure xxx is in JSBindingSettings.classes and execute Assets | JavaScript | Gen Bindings again.
Q: Why overloaded method ends with something like '$$String$$Int'?
A: It is SharpKit's style. SharpKit is a C# compiler compiling C# to javascript. Learn more: sharpkit.net
Q: Unity reports error 'GenericTypeCache.getMethod(someType, someMethod) failed.'
A: This error may occur when you are tring to run app on iOS with IL2CPP. You may have to add something to Assets/JSBinding/link.xml. For more information, see http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html.
Q: Errors occur when building for Windows exe / Mac OS bundle / iOS xcode project / Android apk.
A: First, remember to click Assets | JavaScript | Gen Bindings. Or try to add code to JSBindingSettings.IsDiscard() or JSBindingSettings.IsSupportByDotNet2SubSet() or JSBindingSettings.NeedGenDefaultConstructor().
Q: This error occurs after menu Assets | JavaScript | Gen Bindings:
The type or namespace name `C' does not exist in the namespace `NS'. Are you missing an assembly reference?
A: The type C can only be accessd through reflection. You should add this type to JSBindingSettings.IsDiscard(), and optionaly add it to MissingClasses.javascript.
back to: JSBinding / Home
A: Because Unity treats .js files as Unity script and will try to compile it.
Q: Does JSBinging support javascript debugging?
A: No. We did support debugging in old versions, but it's very hard to use.
Q: Unity says "DllNotFoundException"?
A:
If you are not on Windows, this is a bug, contact: answerwinner@gmail.com
If you are on Windows:
For Unity editor: copy DLL to unity install directory:
for 32bit editor: copy Assets/Plugins/x86/mozjs-31.dll to UnityInstallDir/Editor folder
for 64bit editor: copy Assets/Plugins/x86_64/mozjs-31.dll to UnityInstallDir/Editor folder
For Windows exe: you have to copy(or move) mozjs-31.dll to the folder containing .exe.
Problem still exists? Make sure you have "msvcr110.dll" in "C:\windows\system32". (the dll was built in visual studio 2012). If not, try install microsoft vc2012 runtime.
Q: Does JSBinding package contain full source?
A: Yes. Both C# and C code. Every single line of code is in your hand.
Q: Unity reports 100+ errors
A: Please locate at the first warning or error, that's the real error!
Q: Unity reports warning 'xxx was not found with (with IgnoreNamespace)'
A: Make sure xxx is in JSBindingSettings.classes and execute Assets | JavaScript | Gen Bindings again.
Q: Why overloaded method ends with something like '$$String$$Int'?
A: It is SharpKit's style. SharpKit is a C# compiler compiling C# to javascript. Learn more: sharpkit.net
Q: Unity reports error 'GenericTypeCache.getMethod(someType, someMethod) failed.'
A: This error may occur when you are tring to run app on iOS with IL2CPP. You may have to add something to Assets/JSBinding/link.xml. For more information, see http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html.
Q: Errors occur when building for Windows exe / Mac OS bundle / iOS xcode project / Android apk.
A: First, remember to click Assets | JavaScript | Gen Bindings. Or try to add code to JSBindingSettings.IsDiscard() or JSBindingSettings.IsSupportByDotNet2SubSet() or JSBindingSettings.NeedGenDefaultConstructor().
Q: This error occurs after menu Assets | JavaScript | Gen Bindings:
The type or namespace name `C' does not exist in the namespace `NS'. Are you missing an assembly reference?
A: The type C can only be accessd through reflection. You should add this type to JSBindingSettings.IsDiscard(), and optionaly add it to MissingClasses.javascript.
back to: JSBinding / Home
相关文章推荐
- 用JavaScript改变标签里的内容
- js中对象的小清新理解01
- [译]JavaScript中的Prototype
- js中如何在各个操作中共享信息
- js中new操作符创建对象
- JSON详解
- 【JavaScript】prototype简单解释
- jsp学习笔记1
- URL参数解析
- 最简单的图片轮播--利用myfocus js焦点图库插件
- javascript 面向对象编辑(OOP)
- js正则验证
- js之动态添加dom结点
- jsp中使用Button按钮
- 09、JS解析过程与script域
- 跨域的几种方式
- JS 本地图片预览
- [Effective JavaScript 笔记]第58条:区分数组对象和类数组对象
- Javascript 基础汇总
- js正则匹配大于0小于等于100,其中最多可以保留两位小数