Playmaker Forum

PlayMaker News => General Discussion => Topic started by: Broken Stylus on August 04, 2022, 07:28:15 AM

Title: Taking a look at ByteBrew's implementation
Post by: Broken Stylus on August 04, 2022, 07:28:15 AM
ByteBrew is a new analytics tools suite that is similar to Game Analytics.
I'm looking into their documentation (https://docs.bytebrew.io/sdk/unity) and the tutorials for Unity (https://www.youtube.com/watch?v=PZ9hLFJlBnM&list=PLYlotSZ-B0WSSSsbTOzLWIDw6jzvKcZfm).

I've got an initializer below;

Code: [Select]
using UnityEngine;
using ByteBrewSDK;
//Broken Stylus 2022

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("ByteBrew")]
[Tooltip("Initializes the ByteBrew SDK.")]
public class ByteBrewInitialize : FsmStateAction
{
        // Code that runs on entering the state.
        public override void OnEnter()
        {
            // Initialize ByteBrew
            ByteBrew.InitializeByteBrew();
            Finish();
            //Debug.Log("ByteBrew Initialized");
        }
}
}

However the other functions require more elaborate code obviously. For example, when it comes to collecting data about IAPs and their receipts and sending it to the Dashboard (https://www.youtube.com/watch?v=Z18FClrIdTc&list=PLYlotSZ-B0WSSSsbTOzLWIDw6jzvKcZfm&index=2).
That whole piece of code seen in the video would need to be made slightly more dynamic, for example to replace references to item category, "CoinPack" here, with an FsmString. There is some regional code too.
The publisher doesn't provide code samples unfortunately.
Now there are two options to do this I think. This demonstrated script is called an IAPmanager but it would be preferable to have the action be called an IAP tracker, especially if option 2 is chosen.


I also contacted ByteBrew for some input on this but didn't get any answer yet, perhaps because of the summer break period.