I’m building a game for android, and I encountered an issue.
how do I control the input for the controller?
I thought of using the values of the positions in each of the triggers, but since I’m working on C# and they are written in js, I don’t know how can i access them.
I guess this is more of a question of Unityscript to C# communication vs. the usage of the Android dual joysticks. I’ll take a stab.
You have a couple options:
The first is obviously to port your .js scripts to C#, and all will be well, but there you obviously run the risk of inadvertantly breaking something.
The other option is that you can place any .js files in a folder called “Plugins” they will compile before the C# classes you have written, making all of the variables and references available to you.
Note that they may or may not show up in code-hinting in something like MonoDevelop, but your C# classes will still compile correctly even though you are referencing a .js as if it were also C#. Obviously the compilation success is all that really matters.
Hope that helps.