• 0 Votes
    3 Posts
    38 Views

    @panagiotis-milios Thank you for your response, appreciate your time !
    I solved the issue :
    The url I was using was wrong, more precisely I was using the wrong servlet :
    I was using

    /dispatcherv2

    while I was supposed to use

    /s2sdispatcher.

    I also want to point out that you are right about the "appId" below the "packetId", it is not needed.
    Thank you, I hope this thread will help anyone encountering this problem !

  • 0 Votes
    5 Posts
    69 Views

    Hello @Gavin-Beard!

    We've had trouble reproducing this issue on our end. After some testing with a small app on MacOS and iOS, we have not been able to see the error you are encountering using Unity 2021.3.8.

    If you could, please check out the app here and let us know if this issue is still persisting. It is a barebones authentication app and it should run on multiple devices. The Authentication.cs script has all the gory details. Just open up the Main scene under Assets > App > Misc > Main.unity to get it running. You will also need to add your brainCloud credentials, but you can copy the Authentication example template in brainCloud to test the app.

    Please let us know how this app works on your end and if any issues are encountered! You should be able to click on any error logs in the in-app console to copy the log to your device's clipboard.

    As for your specific issue, my best guess is that perhaps an external library of sorts might not be supported with brainCloud, such as the Newtonsoft Json.NET library. For JSON de/serializing, brainCloud comes with JsonFX. You can also make use of Unity's own JsonUtility for structured JSON de/serialization. Both the app I've shared and the examples on our GitHub make use of JsonFX extensively.

    If you'd like to know more and see how a more robust app can handle brainCloud authentication, as Franco suggested, you should check out our Authentication example on our Unity Examples GitHub.

    Hope this helps! Please let us know if you have further questions or inquiries about this.

  • 0 Votes
    3 Posts
    59 Views

    @JasonL Thanks, I ended up with this cloudCode:

    isForceCreate = String(data.callingMessage.forceCreate) == "true"; isNewUser = String(data.message.newUser) == "true"; var response = {}; response.status = 200; response.data = data.message; if (isForceCreate && isNewUser) { var min = 10000000, max = 999999999 prefix = ["player", "user", "member"] const num = Math.floor(Math.random() * (max - min + 1)) + min; const pre = prefix[Math.floor(Math.random() * prefix.length)]; var defaultPlayerName = pre + String(num); var playerStateProxy = bridge.getPlayerStateServiceProxy(); // We are changing the player name on the server. playerStateProxy.updatePlayerName(defaultPlayerName); // And in this API Call's return data. response.data.playerName = pre + String(num); } response; //return the object

    This works just the way I need

  • 0 Votes
    2 Posts
    22 Views

    Call AttachUniversalIdentity() method from client lib, the username is uniqueness enforced.

  • 0 Votes
    1 Posts
    21 Views
    No one has replied
  • 0 Votes
    1 Posts
    10 Views
    No one has replied
  • 0 Votes
    2 Posts
    24 Views

    I downloaded the BrianCloud plug in for Unreal Engine, I can integrate user authentication, and real-time chat between connected players in a day.

  • 0 Votes
    4 Posts
    32 Views

    @JasonL I understand the reason, but please do provide a way to pass custom data to authenticate api so we can use that data to set user displayname or profile picture or soemthing else on post-hook.
    Without this, we have no choice but to call a seperate call from client (so no beneift of 2 free api inside cloud call)

  • [Unity] Authenticated Event ?

    Solved APIs
    0 Votes
    2 Posts
    124 Views

    Hmm, actually Eric, authentication only happens when called directly in brainCloud.

    If you try calling an API and your app isn't authenticated, you'll receive an error - and generally would trigger authentication yourself as part of your error handling.

    Does that make sense?

    Paul.