1.在unity asset store中找 Forge Networking
2.下载导入到项目中
点击Network Contract Wizard
下图就是forge networking自动生成的登录页面
3、新建一个场景添加cube
(1)让我们将网络对象的名称设置为BasicCube
(2)单击Add Field按钮
(3)将新字段命名为position
(4)将类型设置为Vector3
(5)单击Interpolate按钮,将Interpolate时间(单击插入按钮后弹出的文本字段)设置为0.15
(6)单击Add Field按钮 将新字段命名为rotation
(7)将类型设置为Quaternion
(8)单击Interpolate按钮 ,将Interpolate时间(单击插入按钮后弹出的文本字段)设置为0.15
(9)点击Save & Compile