I have a question about how Debug.Log works in Unity, with SmartFoxServer. I am writing a multiplayer game. The game will always have four players. Due to issues with Unity/Visual Studio, I cannot use the Visual Studio Debugger (It crashes Unity every time I hit a break point). So, I use Debug.Log.
My question is this: When I have four clients running (one is in Unity, the other three are from running the compiled build) and I have a Debug.Log code run, will it run for every instance or just the Unity instance?
FYI, when I do a build, I just do a normal build. I don't have Development Build checked. I am seeing odd behavior when I get a response back from the server. Sometimes, the Debug.Log will print 4 times and sometimes just once. I can debug my Java extension and the break point is only hit once.
Here is some example Unity C# code:
public void OnExtensionResponse(BaseEvent evt) {
string cmd = (string)evt.Params["cmd"];
SFSObject dataObject = (SFSObject)evt.Params["params"];
Debug.Log("Got response from server: " + cmd + " " + dataObject.GetUtfString("gameStatus"));
switch ( cmd ) {
}
Sometimes the Debug.Log code, above, gets called once, sometimes 2 times, or 5 times. Depending on how Logging works, I would expect 1 time (it it only debugs for the Unity version running) or four times (once for each instance of the game running).
thanks