debugging in unity

Options
Hi guys, I'm relatively new to photon cloud, but explored particle demo and successfully ported all logic to build multiplayer third person shooter. However I'm really struggling in debugging photon. I can see there are some internal debug calls but I can't find out where debug output goes to, there is nothing in unity editor console. How to turn it on or where the log is. I'm on Mac. Is there any relevant documentation to debugging and troubleshooting commands etc?
thanks
Stan

Comments

  • vadim
    Options
    Hi,

    By default plugin logs errors only. You can change this any time:
    PhotonNetwork.networkingPeer.DebugOut = ExitGames.Client.Photon.DebugLevel.INFO;
    Full list of possible options in order of verbosity:
    OFF
    ERROR
    WARNING
    INFO
    ALL
    With ExitGames.Client.Photon.DebugLevel.ALL you get all available info.

    [UPDATE]
    Setting DebugOut is not enough sometimes. You need set PhotonNetwork.logLevel also:
    PhotonNetwork.logLevel = PhotonLogLevel.Full
    It set by default to PhotonLogLevel.ErrorsOnly, letting only errors and warnings.
    3rd option is PhotonLogLevel.Informational which lets everything but ALL's

    So for maximum outout set:
    PhotonNetwork.networkingPeer.DebugOut = ExitGames.Client.Photon.DebugLevel.ALL;
    PhotonNetwork.logLevel = PhotonLogLevel.Full;
    
  • Thanks Vadim, I'll try it out straight away.
  • Vadim, took me a bit longer to try to turn it on as I was doing something different till now. Still not able to set debug level.
    I'm in Unity SDK and there seems to be nothing else but ExitGames.Client.Photon package and there is nothing like PhotonNetwork. Classes that are available there have no methods to set debug or loglevel. I tried to go through all classes that I got suggested from API.
  • vadim
    Options
    Looks like you use Photon SDK, not PUN.
    If so, set debug output level for your client:
    this.loadBalancingPeer.DebugOut = DebugLevel.ALL;