Quantcast
Viewing all articles
Browse latest Browse all 1557

Trouble on receiving event data broadcasted from Plugin on PUN classic

Hi, I am using PUN Classic and Photon Plugins v4.
I have a Event broadcasted from Plugins. It appears PUN classic can receive event code but not the content data.
Here's my code.

Plugin:
Dictionary<byte, object> data = new Dictionary<byte, object>();
data.Add(1, "a");
BroadcastEvent(199, data);

PUN:
void OnEnable()
{
PhotonNetwork.OnEventCall += OnPluginEventTest;
}

void OnPluginEventTest(byte eventCode, object content, int senderId)
{
Debug.LogError($"eventCode: {eventCode}, content: {content}, senderId: {senderId}");
}

When BroadcastEvent is called on the Plugin, Callback gets executed on the PUN client, but I get eventCode = 199, content = null, senderId = -1. Why is my content null and how can I send content correctly?

Viewing all articles
Browse latest Browse all 1557

Trending Articles