• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • All tags
    Load new posts
Log in to post
  • Paul WinterhalderP

    brainCloud 5.1 is on it's way!

    Scheduled Pinned Locked Moved General braincloud 5 5.1
    2
    0 Votes
    2 Posts
    532 Views
    Paul WinterhalderP

    And brainCloud 5.1 is now live. Let us know what you think!

  • C

    Update profile name

    Scheduled Pinned Locked Moved Solved APIs unity account profile
    2
    0 Votes
    2 Posts
    710 Views
    Paul WinterhalderP

    Hi,

    The call you're looking for is called UpdateUserName() - https://getbraincloud.com/apidocs/apiref/#capi-playerstate-updateusername

    Good luck!

    Paul.

  • C

    Unreal 5.3.x support

    Scheduled Pinned Locked Moved Solved General
    2
    0 Votes
    2 Posts
    497 Views
    C

    Update: Fixed in the latest release
    https://github.com/getbraincloud/braincloud-unreal-plugin-src/releases/tag/5.0.1
    Thanks Joanne 🙂

  • A

    Deserializing the JSON matchState into a custom object

    Scheduled Pinned Locked Moved Unsolved General
    2
    0 Votes
    2 Posts
    408 Views
    Franco LagoF

    Hello Andrey and thank you for your inquiry,

    For an approach like this I would recommend grabbing the matchState as a Dictionary<string,object> and then making a new instance of JsonMatchState and filling in each field one at a time.

    An example of this would look like to get one of the fields:

    JsonMatchState matchState = new JsonMatchState(); var matchState = data["matchState"] as Dictionary<string, object>; matchState.turnNumber = (int) matchState["turnNumber"];

    Hope this helps and please let us know if you have further questions or inquiries about this.

  • Paul WinterhalderP

    Godot support for brainCloud....

    Scheduled Pinned Locked Moved General braincloud godot
    2
    1 Votes
    2 Posts
    462 Views
    L

    oh already posted! I want to know about godot support plan

  • Ima Need-SupportI

    I didn't receive my registration email...

    Scheduled Pinned Locked Moved Solved Portal Defects portal registration
    2
    0 Votes
    2 Posts
    419 Views
    Paul WinterhalderP

    Sadly, some spam filters don't like our registration emails.

    So be sure to check your spam filter - and whitelist @getbraincloud.com.

    If that doesn't help, contact support via the Green Chat widget, and we'll help you out!

    Paul.

  • N

    Difficulty parsing JSON response in Unity

    Scheduled Pinned Locked Moved APIs unity json jsonutility
    2
    0 Votes
    2 Posts
    596 Views
    Michael CostaM

    Hello! Thanks for your inquiry.

    The format of this response has been used for several years so to change it at this point would cause many errors for our clients. However, in situations like this, we have included the JsonFx library to help deserialize dynamic JSON objects with.

    One way to deserialize the JSON items would be to include a DeserializeItems(string) method in your Data class to be able to store them in an array using JsonFx's JsonReader.Deserialize(string) method:

    public List<Item> Items = new List<object>(); public void DeserializeItems(string jsonResponse) { var response = JsonReader.Deserialize<Dictionary<string, object>>(jsonResponse); var data = response["data"] as Dictionary<string, object>; var items = data["items"] as Dictionary<string, object>; foreach (Dictionary<string, object> item in items.Values) { var newItem = new Item(); newItem.itemId = (string)item["itemId"]; newItem.defId = (string)item["boost_rapidfire"]; newItem.quantity = (int)item["quantity"]; // etc... Items.Add(newItem); } }

    Alternatively, you can also use JsonFx's JsonWriter.Serialize(object) method in the foreach loop to then be able to use Unity's JsonUtility to automatically map it as an Item.

    Understandably, both methods have their own pros and cons. However, it should be able to get the job done in this case.

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

  • A

    Number of users via web hook or S2S call

    Scheduled Pinned Locked Moved APIs s2s webhook
    2
    0 Votes
    2 Posts
    525 Views
    Paul WinterhalderP

    Hmm, not really...

    You can get the number of sessions created in an hour with this call: https://getbraincloud.com/apidocs/apiref/#capi-globalapp-sysgetdailycounts

    But brainCloud doesn't otherwise track a concurrent session count per app.

    There are certainly 3rd party analytics packages that you could link into your client that would give you that sort of information though.

    Paul.

  • D

    ScriptsScheduler has the wrong quote character

    Scheduled Pinned Locked Moved Documentation Defects quote code example
    2
    0 Votes
    2 Posts
    217 Views
    Paul WinterhalderP

    Hi Dan,

    Thanks for reporting that. We'll get it fixed up.

    Paul.

  • K

    getMessagesPage with $or field not working probably

    Scheduled Pinned Locked Moved APIs messaging
    2
    0 Votes
    2 Posts
    499 Views
    J

    Hi Kirlos, as you can see from the response's message field, there are two elements (id and name) underneath, you need to append .id to specify the first search field for id, so change the "message.from" to "messsge.from.id" should solve this problem.

  • Ima Need-SupportI

    How do I code a custom webhook in brainCloud?

    Scheduled Pinned Locked Moved Solved APIs cloud code script webhook
    2
    0 Votes
    2 Posts
    708 Views
    Paul WinterhalderP

    Hi,

    Here are the steps to setting up a webhook to call a custom cloud code script in brainCloud:

    Step 1 - Write your script

    Go to Design | Cloud Code | Scripts and create your script You might want to just start with a simple script that logs the incoming parameters (see sample below) Be sure to enable the S2S callable field on the Details page.

    Step 2 - Declare the webhook and link it to your script

    Go to Design | Cloud Code | WebHooks and create your webhook Link it to the script that you just wrote. If you don't see your script in the list, double-check the state of the S2S callable field You can optionally restrict the webhook to be callable via a range of ip ranges (good for additional security) Click [Save] and copy the webhook URL that gets generated

    Step 3 - Go to the external service, and give it your webhook URL

    This step varies by service of course.

    Step 4 - Trigger the webhook to test

    This also varies by service. You could use Postman to do it as well.

    Step 5 - Confirm the structure of the incoming parameters

    It is a bit difficult to figure out what a webhook will send you ahead-of-time The simplest is to invoke the hook, and then examine the results See the sample logging script below for an example Then view the logged input data via Monitoring | Global Monitoring | Recent Errors. Be sure to enable Info -level messages, and click [Refresh]

    Step 6 - Complete the writing of your script

    Now that you know how the parameters are being sent, you should be good to complete your script. More info on webhook development here - https://getbraincloud.com/apidocs/apiref/?cloudcode#cc-ccscripts-webhooks Good luck!

    Sample script - just dumps parameters:

    var response = {}; bridge.logInfoJson("Script invoked from webhook. Contents of data...", data); // Return the webhook response response.statusOverride = 200; response.jsonResponse = {}; response;

    Note - you can also view the request sent and response received from your webhook via the Server Logs. For more information on brainCloud logs - see this knowledge base article.

    Hope that helps!

    Paul.

  • J

    Convert Anonymous to username/password

    Scheduled Pinned Locked Moved APIs unity authentication
    2
    0 Votes
    2 Posts
    536 Views
    J

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

  • A

    Unity SDK: Android build crash with Minify option enabled

    Scheduled Pinned Locked Moved Client API Defects unity minify android
    2
    0 Votes
    2 Posts
    539 Views
    A

    Hi,
    I temporarily solved it by adding this line in the proguard_user:

    -keep class com.braincloud.unity.* { *; }

    so the BrainCloud classes are no longer minified.

  • Ima Need-SupportI

    What version of Javascript does cloud code support?

    Scheduled Pinned Locked Moved Solved Cloud Code cloud code script javascript
    2
    0 Votes
    2 Posts
    666 Views
    Paul WinterhalderP

    brainCloud's Cloud Code is based on Apache Rhino, which is an open-source implementation of JavaScript. This engine is highly sandboxed within the brainCloud API servers for security purposes.

    brainCloud currently ships with Apache Rhino version 1.7.7.1.

    Rhino implements JavaScript 1.7, and is basically ES4 with partial ES5 and ES6 support.

    Summary from a Stack Overflow discussion here:

    2019-05-27_11-54-35.png

    Hope that helps!

    Paul.

  • G

    bridge.include doesn't exists

    Scheduled Pinned Locked Moved Cloud Code bug
    2
    0 Votes
    2 Posts
    557 Views
    J

    Hey, there must be some syntax error in your script, would you be able to provide your script code here?

  • dhptD

    Steam StartPurchase: No docs, no success

    Scheduled Pinned Locked Moved APIs steam startpurchase microtx marketplace products start purchase
    2
    0 Votes
    2 Posts
    656 Views
    J

    Hi Dylan, actually, the argument purchaseData for StartPurchase() method takes the Steam Item ID (from Edit Price Entry pop-up) as the input field (not the Item ID from the product list)
    7e9ff7b1-1854-4a48-8e38-d219501da3fd-image.png

  • H

    How to add to an array in Cloud Code?

    Scheduled Pinned Locked Moved Cloud Code function push cloud code script array cloud code
    2
    0 Votes
    2 Posts
    681 Views
    H

    I posted this almost 13 days ago with zero answers, so I took some time to look through a bunch of documentation and did a ton of trial and error. Please Braincloud for the love of god add this to your API.

    Rhino does not handle Arrays the way that other coding languages do.

    I figured it out, unlike most arrays that return an array after you call push- Rhino returns the new length. So if you call push, don't set it's value.

    var copyArray = []; //I assume this line tells it to be an array for (var i = 0; i < postResult.data..length; i++) { copyArray[i] = postResult.data[i]; //arrays do not behave like .Net arrays, you can change length without initializing, so you just set each index to the index of the array you're copying } copyArray.push(variableToAdd); //Do NOT set this as the value of your array, the push method returns an int (length of array) NOT an array! //you probably dont need to call push at all to add to the array as shown in the for loop above if you already know your length or want a specific length

    Then just set your value to the variable, like this

    var entityData = { "variableName": copyArray }; //No need to call Array(copyArray) or any of the prototype. slice stuff. If you call Array() you'll just nest the array a second time.

    Use this page for further info on functions you can do with arrays.

  • R

    Simple S2S call via nodejs server

    Scheduled Pinned Locked Moved APIs node.js
    2
    0 Votes
    2 Posts
    541 Views
    R

    This seems to be working now, the error is a wee misleading. The code was correct. The URL was incorrect and was changed to (or leave blank):

    const url = "sharedprod.braincloudservers.com"; ... brainclouds2s.request(global.s2sContext, { service: "group", operation: "SYS_CREATE_GROUP", data: groupData, }); })
  • C

    NPM braincloud package install

    Scheduled Pinned Locked Moved General node.js npm
    2
    0 Votes
    2 Posts
    285 Views
    J

    You can bypass the peer dependencies by adding --legacy-peer-deps flag to your npm install. After modifying package.json, then use npm-install-peers to install the rest of peer dependencies.

  • Paul WinterhalderP

    brainCloud 4.9 is coming! Details and discussion!

    Scheduled Pinned Locked Moved General release 4.9 braincloud
    2
    1 Votes
    2 Posts
    400 Views
    Paul WinterhalderP

    And brainCloud 4.9 is live!

    Let us know if you have questions or issues!

    Paul.

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users