Transfer values from C# to Javascript

What would be the easiest way to move values from, for example, a Vector4 array in C#, to the same in Javascript?

After some comments, I have a full view of your problem. Or at least I hope so :slight_smile:

You have a library written in C#, but for your Unity project you’re using JavaScript. In one of your comments you wrote ‘uscript Vector4’, but there’s no difference between Vector4 in UnityScript/JavaScript and Vector4 used in C#. Both are .NET types. It means, if some method in your library returns Vector4 array, you can call it from UnityScript directly, after you put this library in the Assets folder.

For example, assuming that the library contains a class NoiseGenerator with a method

public static Vector4[] Generate()

you can simply use

var someArray : Vector4[] = NoiseGenerator.Generate();