我犹豫是否要给出两个不同的答案,但我觉得这种方法与另一种方法相比非常独特。有一个有用的函数,它可能正是您所需要的,它被恰当地称为Mathf.Lerp()。var start = 5;var end = 532;var steps = 13;for (int i = 0; i <= steps; i++) { // The type conversion is necessary because both i and steps are integers var value = Mathf.Lerp(start, end, i / (float)steps); Debug.Log(value);}