如何在 Unity 中更改另一个玩家的相机?

How can I change the camera of another player in Unity?

我正在使用 Unity3D 和 Photon,我需要模糊另一个玩家的相机。

有人知道我该怎么做吗?

添加一个PhotonView脚本到相机对象和一个脚本来模糊相机对象。 然后创建下面的脚本并将其添加到相机对象中 按 space 键为对手创建相机模糊效果。

public class PunCamera : MonoBehaviour
{

    private void Update()
    {
        if(Input.GetKeyDown(KeyCode.Space)) 
        {
            OtherPlayerBlur();
        }
    }
    public void OtherPlayerBlur()
    {
        //Get the PhotonView in the camera object and call the RPC
        var _photonView = this.GetComponent<PhotonView>();
        _photonView.RPC("PunCameraBlur", PhotonTarget.Others);
    }

    [PunRPC]
    private void PunCameraBlur()
    {
        // Camera Blur Method Call
    }
}