- Home /
Help convertings c# to js line --using Callback=System.Action
I am trying to convert a CS script into Unityscript and there are a few lines which I don't understand how to convert. Could someone tell me if these are convertible?
using Callback = System.Action<string>
and
(int)(pos.x - rect.x)
and
[DllImport("WebView")] for using osx plugin
DllImport("__Internal")] for using iphone plugin
Answer by whydoidoit · Oct 11, 2012 at 07:02 PM
You could use:
System.Action.<String>
in place of Callback
And use
Mathf.RoundToInt(pos.x - rect.x)
thanks, I found two more that I did not recognize. For the osx plugin would I just use WebView the name of the class? Not sure about the __internal.
Got me there I'm afraid - I've never converted a native plugin thing to Javascript. You are having to define a call through to the CLR DLL - hmmm.
Your answer
Follow this Question
Related Questions
call unity javascript from cs plugin 1 Answer
C# to UnityScript conversion help. 0 Answers
How to pass function as parameter to function? 1 Answer
Trouble converting player controller from JS to C# 1 Answer
How to delete new'd arrays? 2 Answers