Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Assets/StandaloneFileBrowser/Plugins/StandaloneFileBrowser.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ var StandaloneFileBrowserWebGLPlugin = {
// Custom: ".plist, .xml, .yaml"
// multiselect: Allows multiple file selection
UploadFile: function(gameObjectNamePtr, methodNamePtr, filterPtr, multiselect) {
gameObjectName = Pointer_stringify(gameObjectNamePtr);
methodName = Pointer_stringify(methodNamePtr);
filter = Pointer_stringify(filterPtr);
gameObjectName = UTF8ToString(gameObjectNamePtr);
methodName = UTF8ToString(methodNamePtr);
filter = UTF8ToString(filterPtr);

// Delete if element exist
var fileInput = document.getElementById(gameObjectName)
Expand Down Expand Up @@ -62,9 +62,9 @@ var StandaloneFileBrowserWebGLPlugin = {
// byteArray: byte[]
// byteArraySize: byte[].Length
DownloadFile: function(gameObjectNamePtr, methodNamePtr, filenamePtr, byteArray, byteArraySize) {
gameObjectName = Pointer_stringify(gameObjectNamePtr);
methodName = Pointer_stringify(methodNamePtr);
filename = Pointer_stringify(filenamePtr);
gameObjectName = UTF8ToString(gameObjectNamePtr);
methodName = UTF8ToString(methodNamePtr);
filename = UTF8ToString(filenamePtr);

var bytes = new Uint8Array(byteArraySize);
for (var i = 0; i < byteArraySize; i++) {
Expand All @@ -87,4 +87,4 @@ var StandaloneFileBrowserWebGLPlugin = {
}
};

mergeInto(LibraryManager.library, StandaloneFileBrowserWebGLPlugin);
mergeInto(LibraryManager.library, StandaloneFileBrowserWebGLPlugin);