可以使用 Mathf.Max 函数来取三个变量中的最大值。示例代码如下:
int a = 1;
int b = 2;
int c = 3;
int maxValue = Mathf.Max(a, Mathf.Max(b, c));
Debug.Log(maxValue); // 输出结果为 3
可以使用 Mathf.Max 函数来取三个变量中的最大值。示例代码如下:
int a = 1;
int b = 2;
int c = 3;
int maxValue = Mathf.Max(a, Mathf.Max(b, c));
Debug.Log(maxValue); // 输出结果为 3