mapbox2.1.1包导入到import到unity中之后,会报错

Assets\Mapbox\Unity\Location\DeviceLocationProvider.cs(323,37): error CS0103: The name 'heading' does not exist in the current context

双击错误在VisualStudio中打开向下拉找到错误代码的地方

关于unity中使用Mapbox 报错:error CS0103: The name heading does not exist in the current context 的解决方法

仔细看不难发现,这里的heading报错是因为使用了未声明的变量,再向上看有一行声明heading的代码。

把代码定位到doubel前面 点击回车把这行声明heading的代码释放出来,保存再回到unity中看,即可正常运行了。

关于unity中使用Mapbox 报错:error CS0103: The name heading does not exist in the current context 的解决方法

相关文章: