Skip to content

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

Description

@luzma9999

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);
}

}

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions