Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

How can I send byte array from unity to JavaScript?

$
0
0

This is my byte array on Unity side.

byte[] array1 = new byte[(int)size1];

I want to send it to .jslib like this:

[DllImport("__Internal")]private static extern void LoadJavaScriptFile(byte[] array,int size);

but I don't know how to handle this byte array using JavaScript. After:

const buffer = new ArrayBuffer(arraySize);const newByteArray = new Uint8Array(buffer);

what should I do?


Viewing all articles
Browse latest Browse all 12231

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>