Rendering SurfaceTexture to Unity Texture2D

前端 未结 2 1424
你的背包
你的背包 2020-12-15 11:57

I came up with simillar questions earlier, but they weren\'t good clarified and right now I would like to take an advice what\'s wrong I\'m doing in my code.

So what

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 12:24

    You can't call surfaceTexture.updateTexImage(); in onFrameAvailable, call it in DrawFrame() .

    And in Unity3D:

    void Update()
        {
            androidStreamerObj.Call("DrawFrame");
            GL.InvalidateState(); // ADD it
        }
    

提交回复
热议问题