I’m the source of WebCamTexture in WebGL.
Unity\Hub\Editor[ver]\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebCam.js
I looked at the file,
xxx__proxy:'sync',
xxx__sig:'ii',
xxx: function (val) {
return val;
}
I found the emscripten documentation for the __proxy annotation immediately and understood it, but I still can’t understand the __sig annotation because I couldn’t find the documentation.
From the value, I know it’s the signature of the function, but what’s the difference with and without this annotation?
Sig means function signature. The first character represents the function return value, and the subsequent characters denote the function arguments. E.g. ‘ii’ is a function that returns an integer, and takes a single integer value as input. ‘v’ is void, ‘f’ is float and ‘d’ is double.
Neither the __proxy and __sig fields are currently used, because Unity does not yet support building in Emscripten PROXY_TO_PTHREAD=1 mode. However we have added those to be future compatible if that mode becomes current for Unity.