egametang/ET · error · NotImplementedException

The method or operation is not implemented.

Error message

The method or operation is not implemented.

What it means

Trajectory.Apply is a virtual base method whose only body is `throw new NotImplementedException()`. It is an abstract-in-spirit template method: concrete subclasses (e.g. jump/bounce trajectories) override Apply to compute a point along the path. Calling Apply on the base Trajectory type directly means polymorphism was bypassed or a subclass forgot to override.

Source

Thrown at Packages/cn.etetet.recast/Scripts/Core/Share/Detour.Extras/Jumplink/Trajectory.cs:15

using System;
using DotRecast.Core;

namespace DotRecast.Detour.Extras.Jumplink
{
    public class Trajectory
    {
        public float Lerp(float f, float g, float u)
        {
            return u * g + (1f - u) * f;
        }

        public virtual RcVec3f Apply(RcVec3f start, RcVec3f end, float u)
        {
            throw new NotImplementedException();
        }
    }
}

View on GitHub (pinned to 5cab01f7a8)

Solutions

  1. Use a concrete subclass that overrides Apply (e.g. JumpTrajectory).
  2. If you subclass Trajectory, implement Apply with the real interpolation.
  3. Ensure factories return the concrete trajectory type, never the abstract base.

Example fix

// before
var traj = new Trajectory();
var p = traj.Apply(start, end, 0.5f); // throws

// after — use concrete subclass
Trajectory traj = new JumpTrajectory(height);
var p = traj.Apply(start, end, 0.5f);
Defensive patterns

Strategy: type-guard

Type guard

static bool IsConcreteTrajectory(Trajectory t) => t.GetType() != typeof(Trajectory);

Prevention

When it happens

Trigger: Instantiating the base Trajectory class directly and calling Apply; a subclass that does not override Apply; a factory returning the base type instead of a concrete trajectory.

Common situations: Using the wrong type in JumpLinkBuilder where a concrete JumpTrajectory is required; a custom trajectory subclass missing the override keyword; tests/mocks using base Trajectory.

Related errors


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