【发布时间】:2017-06-08 17:59:05
【问题描述】:
lineRenderer.SetWidth(startWidth, endWidth);
lineRenderer.SetVertexCount(linePoints.Count);
在两行相同的警告:
'LineRenderer.SetVertexCount(int)' 已过时:'SetVertexCount 已被弃用。请改用 numPositions 属性。
和
'LineRenderer.SetWidth(float, float)' 已过时:'SetWidth 已被弃用。请改用 startWidth、endWidth 或 widthCurve 属性。
然后我试过了:
lineRenderer.startWidth(startWidth, endWidth);
但是在 startWidth 属性上出现错误:
'LineRenderer.startWidth' 不能像方法一样使用。
【问题讨论】:
-
阅读文档是一种反射,很少有人拥有....docs.unity3d.com/ScriptReference/LineRenderer.html