Is there a way to pass a reference over RPC?

Options
Something like:
    
photonView.RPC("Foo", PhotonTargets.AllBufferedViaServer, ref bar);

    [PunRPC]
    public void Foo (ref bool bar)
    {
    }

Comments

  • i73
    i73
    edited June 2016
    Options
    Never mind, I read some of the other questions and realize I can't.
    Since I am unable to do this, do you have any suggestions on how to set it as a generic?

    Currently the only work around I can see is this:
        [PunRPC]
        public void ToggleBoolOverNetwork(string myString)
        {
            switch (myString)
            {
                case "first index":
                    arrayBool[0] = !arrayBool[0];
                    break;
                case "second index":
                    arrayBool[1] = !arrayBool[1];
                    break;
                default:
                    break;
            }
        }