PUN2 PhotonNetwork.AllocateViewID() different from PUN1?

Hello there,

I am trying to make this piece of code work but in PUN2, PhotonNetwork.AllocateViewID() takes a PhotonViewComponent and return a bool:

public void OnJoinedRoom()
int viewId = PhotonNetwork.AllocateViewID();

RaiseEventOptions raiseEventOptions = new RaiseEventOptions
CachingOption = EventCaching.AddToRoomCache,
Receivers = ReceiverGroup.All

SendOptions sendOptions = new SendOptions
Reliability = true

PhotonNetwork.RaiseEvent(InstantiateVrAvatarEventCode, viewId, raiseEventOptions, sendOptions);

It is from this tutorial page:

This discussion has been closed.