Skip to main content
Version: 5.15.0

Full Code

BackendChart.cs

using UnityEngine;


// Add BACKND SDK namespace
using BackEnd;

public class BackendManager : MonoBehaviour
{
void Start()
{
var bro = Backend.Initialize(); // Initialize BACKND

// Response value for BACKND initialization
if (bro.IsSuccess())
{
Debug.Log("Initialization successful : " + bro); // If successful, 'statusCode 204 Success'
}
else
{
Debug.LogError("Initialization failed : " + bro); // If failed, a 4xx statusCode error occurs
}

Test();
}

// A method that allows synchronous methods to be called from asynchronous methods (cannot be accessed by the Unity UI)
void Test()
{
BackendLogin.Instance.CustomLogin("user1", "1234"); // BACKND login method

// [Addition] Load chartId's chart information
// [Change required] Change the 'File ID' to the file ID value of the chart registered to BACKND Console > Chart Management > Item Chart.
BackendChart.Instance.ChartGet("File ID"); // Example : "64584"

Debug.Log("Test complete.");
}
}

BackendManager.cs

using UnityEngine;


// Add BACKND SDK namespace
using BackEnd;

public class BackendManager : MonoBehaviour
{
void Start()
{
var bro = Backend.Initialize(); // Initialize BACKND

// Response value for BACKND initialization
if (bro.IsSuccess())
{
Debug.Log("Initialization successful : " + bro); // If successful, 'statusCode 204 Success'
}
else
{
Debug.LogError("Initialization failed : " + bro); // If failed, a 4xx statusCode error occurs
}

Test();
}

// A method that allows synchronous methods to be called from asynchronous methods (cannot be accessed by the Unity UI)
void Test()
{
BackendLogin.Instance.CustomLogin("user1", "1234");

BackendChart.Instance.ChartGet("63584"); // [Addition] Load chartId's chart information

Debug.Log("Test complete.");
}
}