0

realvirtualController CPU 500ms+

陈喜成 20 hours ago in realvirtual.io Starter and Professional updated 19 hours ago 1

1.realvirtualController CPU 500ms+

private static void PreFixedUpdateCallback()
{
_fixedUpdateFrameCount++;

for (int i = 0; i < _preFixedUpdateHandlers.Count; i++)
{
if (_preFixedUpdateHandlers[i] != null)
{
try
{
_preFixedUpdateHandlers[i].PreFixedUpdate();
}
catch (System.Exception e)
{

//The performance analyzer determined that the `Object.FindFirstObjectByType()` call was taking more than 150ms++, so it was moved inside the catch block to avoid errors on every refresh.
var controllerInstance = Global.realvirtualcontroller ?? Object.FindFirstObjectByType();
Logger.Error($"Error in PreFixedUpdate: {e.Message}", controllerInstance);
}
}
}
}

//! Callback executed after FixedUpdate
private static void PostFixedUpdateCallback()
{
for (int i = 0; i < _postFixedUpdateHandlers.Count; i++)
{
if (_postFixedUpdateHandlers[i] != null)
{
try
{
_postFixedUpdateHandlers[i].PostFixedUpdate();
}
catch (System.Exception e)
{
//The performance analyzer determined that the `Object.FindFirstObjectByType()` call was taking more than 150ms++, so it was moved inside the catch block to avoid errors on every refresh.
var controllerInstance = Global.realvirtualcontroller ?? Object.FindFirstObjectByType();
Logger.Error($"Error in PostFixedUpdate: {e.Message}", controllerInstance);
}
}
}
}


2.The bug in the MQTT code has been fixed in the reply.

MQTT IN/OUTPUT ERROR [Repair] / realvirtual.io Forum / realvirtual.io (formerly game4automation)