• 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

    Godot support for brainCloud....

    Scheduled Pinned Locked Moved General braincloud godot
    2
    1 Votes
    2 Posts
    313 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
    276 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
    444 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
    376 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
    96 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
    347 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
    459 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
    390 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
    388 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
    418 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
    432 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
    498 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
    429 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
    404 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
    157 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
    229 Views
    Paul WinterhalderP

    And brainCloud 4.9 is live!

    Let us know if you have questions or issues!

    Paul.

  • J

    How to view users online ?

    Scheduled Pinned Locked Moved APIs friends group
    2
    0 Votes
    2 Posts
    350 Views
    Paul WinterhalderP

    Hi Jose,

    Sounds like you want to look into our Presence feature.

    Presence is designed to let users know when their friends are online. You can think of it like the old Xbox Live friends feature - where you can see which of your friends are online - and optionally what they are doing.

    And Presence uses RTT - so users will be notified in realtime when the presence information of a followed user changes.

    Presence works with Friends, Groups, and arbitrary lists of users.

    More details here - http://getbraincloud.com/apidocs/apiref/#capi-presence

    Hope that helps!

    Paul.

  • Ima Need-SupportI

    How do I look-up a player?

    Scheduled Pinned Locked Moved Solved APIs api
    2
    0 Votes
    2 Posts
    426 Views
    Paul WinterhalderP

    Hi,

    brainCloud offers a number of APIs for looking up other players. You'll find them all in the Friend service.

    As far as looking up players by name, it isn't highly recommended - since names in brainCloud are not guaranteed to be unique (and thus lookups are less deterministic and slower).

    It's generally more useful to look up other players by UniversalId - which are guaranteed to be unique.

    Now - maybe your app isn't using Universal Identities - so it seems odd to lookup by the UniversalId. Luckily, brainCloud supports a non-login version of a UniversalId - so you can have the user pick a Display Name which will be associated with their account, but they don't actually log in via it (and there's no password for it stored).

    To use non-login UniversalIds...

    Attach the non-login identity via AttachNonLoginUniversalId() Later on, to update the id, use UpdateUniversalIdLogin() <-- disregard the misleading name - it works for both login and non-login versions of UniversalId Set the player's name to match the universalId (useful for leaderboards) via UpdateUserName() Finally, to look-up a player, use FindUserByExactUniversalId() or FindUserByUniversalIdStartingWith()

    Hope that helps!

    Paul.

  • U

    Setting up segment integration

    Scheduled Pinned Locked Moved General segment integrations
    2
    0 Votes
    2 Posts
    169 Views
    U

    I figured it out. Segment has a Legacy - Project source type, using that worked.

  • D

    Convert to JSON: does brain cloud provide object types for response returns?

    Scheduled Pinned Locked Moved General sdk
    2
    0 Votes
    2 Posts
    231 Views
    D

    Solved:

    IDK if this is the right approach but I am using brainCloud's LitJson and JSONMapper. I will map out the things I need and put it into an object of variables I chose to parse out.

  • Login

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