Skip to main content
Version: 6.0.0

Full Code

BackndDataTable.cs

using UnityEngine;
using System.Threading.Tasks;

// Adds BACKND SDK namespace
using BACKND;

public class BackndManager : MonoBehaviour {
void Start() {
var bro = Backnd.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)
async void Test() {
await Task.Run(() => {
BackndLogin.Instance.CustomSignIn("user1", "1234"); // BACKND login method

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

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

BackndManager.cs

using UnityEngine;
using System.Threading.Tasks;

// Adds BACKND SDK namespace
using BACKND;

public class BackndManager : MonoBehaviour {
void Start() {
var bro = Backnd.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)
async void Test() {
await Task.Run(() => {
BackndLogin.Instance.CustomSignIn("user1", "1234");

BackndDataTable.Instance.DataTableGet("63584"); // [Addition] Loads chartId's chart information

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