can ContextMenu pass arguments into a method?

I’m currently doing this sort of thing - a lot - to test run methods from the inspector as I go

    [ContextMenu("Do Something")]
    void DoSomething()
    {
        Debug.Log("Did something");
    }

But when my methods have arguments I hate to add/modify stuff just for testing - without knowing if there might be something like this:

    [ContextMenu("Do Something").With( this )]
    void DoSomething( this )
    {
        Debug.Log("Did something with this");
    }

Thanks (nooby question)

I don’t think so, there is no constructor for that, and nothing in the documentation.

Usually I would just write an overload to the method with no parameters that calls the overload you actually want to with some default parameters. Or maybe add those parameters on class level if I need quick prototyping with multiple different values.

If the new method is only for debug, wrap it in “#if Unity_Editor” preprocessor directive block.

I know it’s not ideal, but it is what it is. I’m thinking maybe Odin will have a solution for that, they usually do