Registering Event Raised - OnEnable & OnDisable functions for PUN2
Options
Hi, can someone tell me what would be the equivalent for the bottom script when using PUN2? I am stuck on this one.
public void OnEnable()
{
PhotonNetwork.OnEventCall += OnEvent;
}
public void OnDisable()
{
PhotonNetwork.OnEventCall -= OnEvent;
}
Thanks.
public void OnEnable()
{
PhotonNetwork.OnEventCall += OnEvent;
}
public void OnDisable()
{
PhotonNetwork.OnEventCall -= OnEvent;
}
Thanks.
0
Comments
-
Hi @Rob161,
please take a look at the updated RPCs and RaiseEvent documentation page. There are two possibilities mentioned on this page: you can either use the IOnEventCallback interface or the LoadBalancingClient.EventReceived action.1