JSBinding / FAQ & Trouble Shooting
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
posted on 2016-07-06 21:34 AnswerWinner 阅读(320) 评论(0) 编辑 收藏 举报