1
这是什么问题?我得到了前两行的错误。C#,不能隐式地将`long'类型转换为`uint'
bounds.xMin = (Mathf.FloorToInt (x/GridSize) * GridSize);
bounds.yMin = (Mathf.FloorToInt (y/GridSize) * GridSize);
bounds.xMax = bounds.xMin + GridSize;
bounds.yMax = bounds.yMin + GridSize;
bounds.xMin
,bounds.yMin
,x
,y
和GridSize
都是类型uint
。
尝试铸造到uint?即bounds.xMin =(uint)(Mathf.FloorToInt(x/GridSize)* GridSize); –