Int64和int32不同位数类型计算注意点
Int64 id = 0;
int tmp = (int)readInt();---------》Int64 tmp = (Int64)readInt();
id = id + tmp * 256 * 256 * 256 * 256;
--->如果tmp是int类型,那么tmp * 256 * 256 * 256 * 256==0
-->必须改为Int64 tmp,这样才能正确计算出非0的实际值
Debug.Log("Entity id " + id);
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。