Mert
Member
Hi.
This was a post about efficiently sending data to extensions, and receive from them. Normally, we can send arguments(double and string) as parameters to functions. Sometimes, we need more than that, and send some blob of data. In the past it worked like this:
And then in the extension(Java/Javascript/Cpp), we parsed this blob of data. Like:
However, this looked ugly. Then I found out something, mainly from Yoyogames' extensions source code. I detailed this in the following video
This was a post about efficiently sending data to extensions, and receive from them. Normally, we can send arguments(double and string) as parameters to functions. Sometimes, we need more than that, and send some blob of data. In the past it worked like this:
GML:
extensionFunctionX("Hello:!HowAreYou:!200:!Who");
JavaScript:
var str =
function extensionFunctionX(data) {
var str = data; //"Hello:!HowAreYou:!200:!Who"
var res = str.split(":!");
//Use the data
var first = res[0];
}
Last edited: