Convert from JS to C#

Can anybody translate these two JavaScript sources to C#?



This might not be the answer you were waiting for, but…

Translating these is not hard, but I highly doubt that anyone will do it for you, because it is time consuming.

If you don’t feel good at translating JS to C# then maybe you can just get these scripts and put them into Assets\Plugins folder and then you’ll be able to use them from C#.

Another option would be to use some conversion tool, for example But remember, that this won’t solve all the issues, and you’d need to fix the code after conversion. But I guess this will be quite easy if you know C#. And I assume you know, if your code is C# based.