更新时间:2023-02-02 19:26:45
由于示例代码并未真正完成,因此我将指出一些常见的可能错误:
Since the example code is not really complete, i´ll point you to some common possible errors:
void根据帧速率调用每一帧的void Update(),以半固定帧速率调用void FixedUpdate()的每一帧.如果希望每个(固定)帧都发生一些事情,则应将代码放在其中.在您的示例中,您仅将方法命名为void UpdateMesh(),这并不意味着它在每个框架中都被调用:尚不清楚,如果在void UpdateMesh()中根本没有发生任何更改,则不清楚.例如,没有代码可以改变顶点的位置.
from you posted code it´s not clear, if there are changes happening in void UpdateMesh() at all. For example there is no code which changes positions of vertices.