No Reference To SendOptions? Attempting to use RaiseEvent - PUN v2

Options
I am attempting the examples in the RaiseEvent sections of this doc.

The Type or Namespace "SendOptions" can not be found. Is this intended? Am I missing something?

This is a sample class that will show the error:

using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
using Photon.Chat;

public class TestScript : MonoBehaviour {
void Test()
{
byte evCode = 0;
object[] content = new object[] { new Vector3(10.0f, 2.0f, 5.0f), 1, 2, 5, 10 };
RaiseEventOptions raiseEventOptions = new RaiseEventOptions { Receivers = ReceiverGroup.All };
SendOptions sendOptions = new SendOptions { Reliability = true };
PhotonNetwork.RaiseEvent(evCode, content, raiseEventOptions, sendOptions);
}
}

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2018
    Options
    Hi @curreta,

    You are missing a
    using ExitGames.Client.Photon;
    or full class name
    ExitGames.Client.Photon.SendOptions
    as SendOptions is part of the Photon library.

  • curreta
    Options
    @JohnTube Much thanks! I'm sure that'll fix it up!