LILuaErrorObserver
The callback of LI PASS Lua Error event, the game needs to process the callback function. When a Lua error occurs, the callback is triggered.
note
It is strongly recommended to incorporate the callback within the startup function of the game. Supported in LI PASS V1.06 and later versions.
Function definition
// Add callbacks
void AddLILuaErrorObserver(OnLILuaErrorResultHandler<string> liLuaError);
// Remove callbacks
void RemoveLILuaErrorObserver(OnLILuaErrorResultHandler<string> liLuaError);
Code sample
// Add callbacks
public void AddLuaErrorObserver()
{
LevelInfinite.AddLILuaErrorbserver(OnLILuaErrorResult);
}
// Remove callbacks
public void RemoveLuaErrorObserver()
{
INTLAPI.RemoveLILuaErrorObserver(OnLILuaErrorResult);
}
// Handle LILuaErrorObserver callback result
private void OnLILuaErrorResult(string errorStr)
{
}