Skip to main content
Version: 5.9.6

SendQueueMgr

SendQueueMgr is a script provided for users to conveniently use SendQueue.
Once SendQueueMgr.cs is applied to the Unity object, you are ready to use SendQueue.

About SendQueueMgr

  • Once the script is applied to the object, the user may initialize SendQueue and perform start, stop, pause, and restart depending on the status of the game.
  • Unity's DontDestroyOnLoad is applied, meaning that the object is not destroyed when the scene is newly loaded.
  • It is provided as a simple script, so developers can conveniently customize it the way they want.

Apply SendQueueMgr

1. In the BACKND SDK installation folder of the Unity project(default path: Assets>TheBackend) > ToolKit folder, there is SendQueueMgr.cs.



2. Apply that script to an object in the Unity scene to apply SendQueueMgr.

Process exception events

When an exception occurs, the ExcetionEvent(Exception e) method in SendQueueMgr.cs will be called.
Exceptions are set to be displayed using the Debug.Log method by default.
Developers can add an exception processing logic they want.

Insert a method in SendQueue

You can insert a method into SendQueue in the same way as the existing SendQueue.
Call the following method in the script where you wish to call BACKND functions to insert the method in SendQueue.

Enqueue(Func<BackendReturnObject> BackendFunc, Action<BackendReturnObject> callback) -> static void
Enqueue<T1>(Func<T1, BackendReturnObject> BackendFunc, T1 GT, Action<BackendReturnObject> callback) -> static void
Enqueue<T1, T2>(Func<T1, BackendReturnObject> BackendFunc, T1 GT1, T2 GT2, Action<BackendReturnObject> callback) -> static void
Enqueue<T1, T2, T3>(Func<T1, BackendReturnObject> BackendFunc, , T1 GT1, T2 GT2, T3 GT3, Action<BackendReturnObject> callback) -> static void
Enqueue<T1, T2, T3, T4>(Func<T1, BackendReturnObject> BackendFunc, , T1 GT1, T2 GT2, T3 GT3, T4 GT4 Action<BackendReturnObject> callback) -> static void
Enqueue<T1, T2, T3, T4, T5>(Func<T1, BackendReturnObject> BackendFunc, , T1 GT1, T2 GT2, T3 GT3, T4 GT4, T5 GT5 Action<BackendReturnObject> callback) -> static void

// example
SendQueue.Enqueue(Backend.GameInfo.GetPublicContents, "publicTable", callback =>
{
// Post-process
});