© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•16mo ago
Healer

[Unity] Is there a way to have a ContextMenu give an arguement to a method?

I'm working on a real simple save function in Unity that I can call from the context menu, and everything works wonderfully without an input (of where to save) so far, but I'd like to be able to test it with different save locations. That's all context though, my question is can I pass an input into the method being called through the Context Menu?

https://discussions.unity.com/t/can-contextmenu-pass-arguments-into-a-method/248683
I found this discussion thread, but it's a few years old and just amounts to "Probably not", so I'm curious if anything has changed.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ is there a way for a method to have interchangeable parameter?
C#CC# / help
3y ago
Is there some way that I can have a method in a Dictionary?
C#CC# / help
4y ago
❔ Is there a way to name an object with an input?
C#CC# / help
3y ago
✅ is there a way to get the method name from Task?
C#CC# / help
3y ago