itinero/routing

Itinero-Unity: MissingMethodException: ProtoBuf.Meta.RuntimeTypeModel ProtoBuf.Meta.TypeModel.Create()

luzma9999 opened this issue · 1 comments

Hi,
I have just installed Itinero (v1 5.1) and Itinero.IO.Osm (v1 5. 1) on Unity.
The API Compatibility Level in this Unity version editor is NET Standard 2.0
The compilation in Unity works without errors, but when I try to execute the following code, the error message is:

MissingMethodException: ProtoBuf.Meta.RuntimeTypeModel ProtoBuf.Meta.TypeModel.Create()
OsmSharp.Streams.PBFOsmStreamSource.InitializePBFReader () (at <775beed0bba04915a5025f5b1bd63dfd>:0)

Where is the problem? Can someone help me? Should I install a higher Itinero and Itinero.IO.Osm version?

Thanks for advance.

Luzma.

The Unity C# code:

using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using Itinero;
using Itinero.IO.Osm;
using Itinero.Osm.Vehicles;

public class ReadOSMFile : MonoBehaviour
{
void Start()
{
// load some routing data and build a routing network.
var routerDb = new RouterDb();
using (var stream = new FileInfo(@"/path/to/some/osmfile.osm.pbf").OpenRead())
{
// create the network for cars only.
routerDb.LoadOsmData(stream, Vehicle.Bicycle);
//routerDb = RouterDb.Deserialize(stream);
}

}

}

I have solved installing a higher version of Itinero and Itinero.IO.Osm.