What is required to make an RPC work (RPC not currently working)?

Options

I am making a program that establishes a connection between an android device and a PC and then allows the PC to receive basic data from the android device. The connection and room connection are working properly (both are in the same room), however, the RPC call seems to be not working.

    [PunRPC]
    void updateStream(uint stream)
    {
        calledRPC = "called";
        dataStream = stream;
        receivedRPC = true;
    }


    void CallStreamUpdate(uint stream)
    {
        calledRPC = "function entered";
        punView.RPC(nameof(updateStream), RpcTarget.Others, stream);
        calledRPC = "complete";
    }

The calledRPC variable is displayed on the android device, and is displayed as "function entered" only, which suggests that there is an error with either the punView.RPC function or the actual RPC. The function CallStreamUpdate is called within the Update MonoBehaviour of the android device. This piece of code is attached to the main network manager.


What am I missing? Are there any components/settings that need to be active for an RPC to work?

Answers