[Help] Raise Event does not work.

Hello everyone, I'm going straight to the point, I need to send an Event via Raise Event, but since the EventData.Code check does not match, then analyze if I was sending the event, and apparently it is not being sent. I went to the script "PhotonNetwork.cs" and put two Debug.Log in the Raise Event event, to check where the problem is and it turns out that the bool variable "OfflineMode" is always false, therefore it never saves the event code. My question is: Why doesn't that variable give true? And sorry for my bad English, it's not my mother tongue.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[Code of Script "PhotonNetwork.cs"]

public static bool RaiseEvent(byte eventCode, object eventContent, RaiseEventOptions raiseEventOptions, SendOptions sendOptions)
{
Debug.Log("Call event RaiseEvent");//this if it runs
if (offlineMode)
{
//this does NOT run
Debug.Log("Offline Mode On, ok.");
if (raiseEventOptions.Receivers == ReceiverGroup.Others)
{
return true;
}

EventData evData = new EventData { Code = eventCode, Parameters = new Dictionary<byte, object> { {ParameterCode.Data, eventContent} } };
NetworkingClient.OnEvent(evData);
return true;
}
else
{
Debug.Log("??"); //this if it runs
}
Sign In or Register to comment.