• 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 categories
    Load new posts
Log in to post
  • F

    [Unity] In App Purchases

    Scheduled Pinned Locked Moved Solved APIs unity in app purchases mobile
    2
    0 Votes
    2 Posts
    538 Views
    J

    brainCloud supports a wide range of popular in-app purchases, including Google Play, Apple, Facebook, Amazon, and Steam, etc.. In most cases, the purchase process is initiated through the corresponding IAP plugin that you need to download into your Unity project. Then, verify the receipt received from the purchase outcome with brainCloud by calling VerifyPurchase API. It should be noted that the necessary configuration for the IAP store must be set up in the brainCloud portal for your app, including the products section and platforms section. Some store integration examples are available on our documentation website -- https://docs.braincloudservers.com/learn/portal-tutorials/store-integration-google/
    Hope this helps!

  • M

    Best way to test/fake IAP calls and results without committing to an IAP platform?

    Scheduled Pinned Locked Moved Unsolved General unity iap marketplace
    1
    0 Votes
    1 Posts
    232 Views
    No one has replied
  • N

    Difficulty parsing JSON response in Unity

    Scheduled Pinned Locked Moved APIs unity json jsonutility
    2
    0 Votes
    2 Posts
    434 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.

  • G

    Async match without opponent

    Scheduled Pinned Locked Moved General unity async match
    6
    0 Votes
    6 Posts
    637 Views
    A

    Also looking for this type of functionality, so id +1 this feature request

  • R

    Solution: WebGL: Unity 2021 Websocket-native Runtime Error

    Scheduled Pinned Locked Moved APIs unity error solution web
    1
    0 Votes
    1 Posts
    488 Views
    No one has replied
  • J

    Convert Anonymous to username/password

    Scheduled Pinned Locked Moved APIs unity authentication
    2
    0 Votes
    2 Posts
    374 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
    371 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.

  • B

    Gamesparks Migration - Authentication Questions

    Scheduled Pinned Locked Moved General unity authentication gamesparks
    1
    0 Votes
    1 Posts
    216 Views
    No one has replied
  • Kenneth LightnerK

    Some questions on the Relay Server service?

    Scheduled Pinned Locked Moved General relayservice multiplayer unity unet relay
    1
    0 Votes
    1 Posts
    144 Views
    No one has replied
  • G

    Authentication error - Unity iOS

    Scheduled Pinned Locked Moved APIs unity error ios
    4
    0 Votes
    4 Posts
    558 Views
    A

    Hi Gavin,

    Did you resolve the crash issue on iOS? I am experiencing it as well, so I feel I must have missed something 🙂

    Cheers,
    Andreas

  • T

    Saving global stats that are accessible with listFriends request.

    Scheduled Pinned Locked Moved APIs unity publicdata cheatprevent summaryfrienddata
    2
    0 Votes
    2 Posts
    225 Views
    J

    To limit operations like IncrementExperiencePoints() to cloud code only. This will essentially take away the ability to make these calls from the bare client API. You can see a script that enforces these restrictions here - https://getbraincloud.com/apidocs/cloud-code-central/handy-cloud-code-scripts/restrictclientcalls-script/

    Refer to another post below for more strategies you can apply to prevent cheating: https://forums.getbraincloud.com/topic/23/discussion-strategies-to-prevent-cheating-in-tournaments

  • D

    brainCloud Space Shooter not working in Unity 2019.3.2f1

    Scheduled Pinned Locked Moved Client API Defects unity
    1
    0 Votes
    1 Posts
    132 Views
    No one has replied
  • A

    Can I create a chat in Brain Cloud?

    Scheduled Pinned Locked Moved General unity server chat authentication
    2
    0 Votes
    2 Posts
    277 Views
    Y

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

  • A

    Unity SDK : AbandonMatch/Complete Match WithSummaryData throw error for optional param

    Scheduled Pinned Locked Moved Client API Defects unity bug
    1
    0 Votes
    1 Posts
    118 Views
    No one has replied
  • C

    User Entity vs Global Entity Indexed ID

    Scheduled Pinned Locked Moved APIs unity cloudscript entities
    4
    0 Votes
    4 Posts
    294 Views
    Paul WinterhalderP

    Hi Chris,

    User entities are primarily indexed by profileId + entityType - so the singleton API will scale well no matter how many players you have.

    That said, if your use case gets more complicated, with say hundreds of entities of a particular type per user (say maybe you are modelling user created towns, that sort of thing) - you could consider using Owned Custom Entities instead. You can define addition, custom indexes for those... keeps those lookups fast and efficient.

    In addition, if you end up having >1000 Global Entities, you should definitely look at switching to Unowned Custom Entities. Same deal - you can define your own custom indexes...

    Hope that helps!

    Paul.

  • H

    Recommended way to read Entity data? (Unity, C#)

    Scheduled Pinned Locked Moved APIs unity entity
    3
    0 Votes
    3 Posts
    351 Views
    T

    @Henry-Smith said in Recommended way to read Entity data? (Unity, C#):

    Sorry to bring back an old thread, but I'm just learning the platform and I thought I'd share my solution to this.

    First, define a generic class to handle the raw json response data:
    eg. my Tut1_AddTwoNumbers api returns:

    {"data":{"response":{"answer":24},"success":true},"status":200} public class Response<T> { public ResponseData<T> data; public int status; } public class ResponseData<T> { public T response; public bool success; }

    Then for each api call that you have, define a class that contains the fields that are custom to that response.

    public class Tut1_AddTwoNumbersResponse { public int answer; }

    Now, you call your function and handle the response like this:

    public void Tut1_AddTwoNumbers() { string scriptName = "Tut1_AddTwoNumbers"; // Anonymous object to supply the params. var data = new { num1 = 16, num2 = 8 }; var jsonScriptData = JsonWriter.Serialize(data); SuccessCallback successCallback = (response, userdata) => { var responseObject = JsonReader.Deserialize<Response<Tut1_AddTwoNumbersResponse>>(response); //var responseObject = JObject.Parse(response); Debug.Log($"Success The answer is '{responseObject.data.response.answer}' | raw_json={response}"); }; FailureCallback failureCallback = (status, code, error, userdata) => { Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error)); }; // Call the script _bc.ScriptService.RunScript(scriptName, jsonScriptData, successCallback, failureCallback); }

    this line is the important part:

    JsonReader.Deserialize<Response<Tut1_AddTwoNumbersResponse>>(response);

    Hope that helps someone!

  • Login

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