Right way to call monobehaviour from photon listener

Options
Hi guys,

We have a working photon-server solution for sometime now.

I seem to be having issues due to the calling of monobehaviour classes from delegates fired from the photon listener (mainly in the implementation of "PeerStatusCallback()" and "OperationResult()").

Currently, the delegates are set with methods coming from a monobehaviour class. It there any other way I should be doing the reference between unity and photon?

(For instance, I get this unity error:
"comparebaseobjects can only be called from the main thread." due to this call:
if (prefabGameObject == null )... // prefabGameObject is a prefab reference..)
which is done within the delegate method implementing the callback in the photon listener).