Troubleshooting PubNub Unity SDK

How to enable logging

Set LogVerbosity to PNLogVerbosity.BODY when initializing PubNub.

Enable PubNub logging

PubNub logging

Enabling this setting produces a considerable amount of records.

To enable PubNub logging:

  1. In the Unity Editor, go to File -> Build Settings -> Player Settings -> Other Settings -> Configuration > Scripting define symbols. Do this for each of the platforms you want to enable logging.

  2. After you type ENABLE_PUBNUB_LOGGING, remember to press Return with the focus in the text box, or Unity Editor will not save your setting.

  3. In the Build Settings of Unity Editor, check Development Build, then build and run.

You can find the logs at the following link: https://docs.unity3d.com/Manual/LogFiles.html.

Enable exceptions

The callback can throw exceptions instead of errors. To enable exceptions:

  1. In the Unity Editor, go to File -> Build Settings -> Player Settings -> Other Settings -> Configuration > Scripting define symbols. Do this for each of the platforms you want to enable exceptions.

  2. After you type ENABLE_PUBNUB_EXCEPTIONS, remember to press Return with the focus in the text box, or Unity Editor will not save your setting.

Last updated on