I have the following listener setup in my only scene:
ui.OnMessageReceived += (view, message) => { var path = message.Path; var action = message.Args ["action"]; if (path == "app") { if (action == "log") { Debug.Log ("[W] " + message.Args ["text"]); } } };
And in my web view, I have this log function:
log: function(m) { window.location.href = 'uniwebview://app?action=log&text=' + m; }
When I execute the following code, the only result that appears in logcat are tests 5 and E:
app.log("Echo Test (1)"); app.log("Echo Test (2)"); app.log("Echo Test (3)"); app.log("Echo Test (4)"); app.log("Echo Test (5)"); setTimeout(function() { app.log("Echo Test (A)"); app.log("Echo Test (B)"); app.log("Echo Test (C)"); app.log("Echo Test (D)"); app.log("Echo Test (E)"); }, 500);
08-16 13:55:20.229 13860 13881 I Unity : [W] Echo Test (5) 08-16 13:55:20.693 13860 13881 I Unity : [W] Echo Test (E)
What causes this and how can it be fixed?
source share