You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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);
}
}
}
The text was updated successfully, but these errors were encountered:
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);
}
}
The text was updated successfully, but these errors were encountered: