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:
-
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. -
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. -
In the
Build Settings
of Unity Editor, checkDevelopment 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:
-
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. -
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.