コード例 #1
0
    public void StartVideoServer(int port)
    {
        _streamCamera  = this.GetComponent <Camera>();
        _renderTexture = new RenderTexture(Resolution, Resolution, 16, RenderTextureFormat.ARGB32);
        _renderTexture.Create();
        _streamCamera.targetTexture = _renderTexture;
        _tempTexture = new Texture2D(Resolution, Resolution, TextureFormat.RGBA32, false);

        _videoServer = new VideoServer();
        _videoServer.Start(port, this);
    }
コード例 #2
0
 void Start()
 {
     _streamCamera = this.GetComponent <Camera>();
     _videoServer  = new VideoServer();
     _videoServer.Start();
 }