egametang/ET · error · NotImplementedException

The method or operation is not implemented.

Error message

The method or operation is not implemented.

What it means

SimpleInputGeomProvider.GetOffMeshConnections throws NotImplementedException. This minimal geometry provider stores only a triangle mesh and convex volumes; off-mesh connection support was intentionally left unimplemented. Any caller that needs off-mesh links will fail.

Source

Thrown at Packages/cn.etetet.recast/Scripts/Core/Share/Recast/Geom/SimpleInputGeomProvider.cs:125

            vol.hmin = minh;
            vol.hmax = maxh;
            vol.verts = verts;
            vol.areaMod = areaMod;
        }

        public void AddConvexVolume(RcConvexVolume convexVolume)
        {
            volumes.Add(convexVolume);
        }

        public IEnumerable<RcTriMesh> Meshes()
        {
            return RcImmutableArray.Create(_mesh);
        }

        public List<RcOffMeshConnection> GetOffMeshConnections()
        {
            throw new NotImplementedException();
        }

        public void AddOffMeshConnection(RcVec3f start, RcVec3f end, float radius, bool bidir, int area, int flags)
        {
            throw new NotImplementedException();
        }

        public void RemoveOffMeshConnections(Predicate<RcOffMeshConnection> filter)
        {
            throw new NotImplementedException();
        }

        public void CalculateNormals()
        {
            for (int i = 0; i < faces.Length; i += 3)
            {
                int v0 = faces[i] * 3;
                int v1 = faces[i + 1] * 3;

View on GitHub (pinned to 5cab01f7a8)

Solutions

  1. Subclass SimpleInputGeomProvider and implement GetOffMeshConnections with a backing list.
  2. Use a full input geometry provider that implements the off-mesh API surface.
  3. Skip the code path that queries off-mesh connections if your scene does not need them.

Example fix

// before
var geom = new SimpleInputGeomProvider(verts, faces);
var links = geom.GetOffMeshConnections(); // throws

// after
public class FullInputGeomProvider : SimpleInputGeomProvider
{
    private readonly List<RcOffMeshConnection> _offMesh = new();
    public override List<RcOffMeshConnection> GetOffMeshConnections() => _offMesh;
    // ...implement Add/Remove as well
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (geom is SimpleInputGeomProvider) throw new NotSupportedException("Off-mesh connections unsupported on SimpleInputGeomProvider");

Type guard

static bool SupportsOffMeshConnections(IInputGeomProvider geom)
    => !(geom is SimpleInputGeomProvider) || geom.GetType().GetMethod(nameof(GetOffMeshConnections))?.DeclaringType != typeof(SimpleInputGeomProvider);

Try / catch

try { var links = geom.GetOffMeshConnections(); }
catch (NotImplementedException) { links = new List<RcOffMeshConnection>(); }

Prevention

When it happens

Trigger: Calling GetOffMeshConnections() on a SimpleInputGeomProvider instance; passing a SimpleInputGeomProvider to Recast pipelines (e.g., crowd/off-mesh link setup) that query off-mesh connections.

Common situations: Using the sample/simple geometry provider for a scene that requires jump links, teleports, or off-mesh transitions.

Related errors


AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13). Data as JSON: /api/errors/4f6eab3efa08f4b3. Report an issue: GitHub.