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); –