'ComputeShader does not contain a definition for SetMatrix'

'ComputeShader does not contain a definition for SetMatrix'

目前我正在尝试关注this tutorial on ray tracing using compute shaders。我正在尝试使用 ComputeShader.SetMatrix(string name, Matrix4x4 val) 为计算着色器设置矩阵,或者在我的情况下,具体来说,RayTracingShader.SetMatrix("_CameraToWorld", _camera.cameraToWorldMatrix);.

然而,我收到错误 'ComputeShader does not contain a definition for SetMatrix',尽管 this Unity page 清楚地表明它应该是可能的。我也无法在 Google 上找到有类似问题的人。我刚刚将 Unity 更新到 5.5.4p4 个人版。在此之前它也没有用。

如果能帮助解决这个问题,我们将不胜感激。

Unity 5.5 does not define ComputeShader.SetMatrix.

您需要更新到 ComputeShader.SetMatrix 存在的 Unity 版本。

好像第一次到2017.3