Hi @jpalmz ,
I am not aware of an example or tutorial on this, but the basic Nakama JS getting started guide should work. Playcanvas doesn’t anything special with external Javascript libraries.
Here are two forum posts on the same subject, posting in case you haven’t seen them and are useful:
It would help if I typed in the right IP address! OK, I’ve corrected that, and now I get:
Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR
Here’s the code I’m using:
var NakamaTest = pc.createScript('nakamaTest');
// initialize code called once per entity
NakamaTest.prototype.initialize = function() {
this.authenticate();
console.info("this.authenticate() completed");
};
// update code called every frame
NakamaTest.prototype.update = function(dt) {
};
NakamaTest.prototype.…
My Code:
var ItsAscript = pc.createScript('itsAscript');
ItsAscript.prototype.initialize = function() {
var nakamajs = document.createElement('script');
nakamajs.src = '/nakama-js.umd.js';
document.head.appendChild(nakamajs);
//window.alert("OKA");
var client = new nakamajs.Client("defaultkey", "192.168.1.44", 7350);
client.ssl = false;
print("print ho rha hai");
var email = "super@heroes.com";
var password = "batsignal";
var session = c…
2 Likes