Calling Invoke or similair from a non monobehavior

I have created an animation class and I want to use some delay functionality. Now it would be nice if I could use someting like Invoke(“MethodName”) but since the animation object is not a monobehavior I can’t.

What be the best approach to this problem?

Coroutine/delay isn’t directly supported in unity outside of the monobehaviour bubble. You can

1: look at ienumerables to reimplement coroutine/delay support for these yourself.
2: put a (possibly hard-coded) state machine into the animation class’s update function (so, instead of yielding, you just return from the update function + set a variable to tell it where to resume when it gets ticked next frame). that’s best for single-frame delays, but can be modified to do other things.
3: make your own invoke method - manually keep a list of method names + times to execute them that’s read from each tick and the appropriate methods executed + removed from the list.
4: make the animation object a monobehaviour.

If it’s not big or important, I’d do 2 (or 3).

I believe you can do that with System.Reflection MethodInfo