- Home /
Debug.Log in RPC
I'm trying to use debug messages in an RPC. However, no matter what I do, the messages never show up. My first thought was of course the RPC was not being called, but everything looked correct. So, I changed the RPC call to loop every frame and set transform.position = Vector3.zero. It does exactly what it should -- set the position to (0,0,0) every frame -- but the Debug.Log still does not show up in the console. Is this intended behavior?
void Update()
{
networkView.RPC("TestRPC", RPCMode.All);
}
[RPC]
void TestRPC()
{
Debug.Log("Hello"); // does not display in console when using server OR client
transform.position = Vector3.zero; // works
}
Comment
Change it to Debug.LogError and activate "Error Pause" in the console. If it pauses, then we'll have more information. (Also, ensure the debug.log button (third button from the right in console tab) is actually on. Sometimes that happens...)