Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Call a C# method by reflection — including private methods. Requires a method schema obtained via 'reflection-method-find'. Supports static methods, instance methods (with optional target deserialization), and main-thread / off-thread execution.
Use this skill ↓55% 95%+41 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 12 of 22 without it.
3 of 3 safety checks passed
Not used yet
Call C# method. Any method could be called, even private methods. It requires to receive proper method schema. Use 'reflection-method-find' to find available method before using it. Receives input parameters and returns result.
typeName, MethodName, Parameters)typeNameMatchLevel / methodNameMatchLevel (default 1 — contains ignoring case): 0 ignore filter, 1 contains-ic, 2 contains-cs, 3 starts-with-ic, 4 starts-with-cs, 5 equals-ic, 6 equals-cs.parametersMatchLevel (default 2 — equals): 0 ignore filter, 1 count matches, 2 equals.targetObject (optional) — for instance methods. When null, a new instance is created from the declaring type. Required shape: { type, value } (value is deserialized to type).inputParameters (optional) — list of { type, name, value }. Names are enhanced against the resolved method signature if omitted.executeInMainThread (default true) — Unity API calls should keep this true; set false only for thread-safe pure logic.unity-mcp-cli run-tool reflection-method-call --input '{
"filter": "string_value",
"knownNamespace": false,
"typeNameMatchLevel": 0,
"methodNameMatchLevel": 0,
"parametersMatchLevel": 0,
"targetObject": "string_value",
"inputParameters": "string_value",
"executeInMainThread": false
}'
For complex input (multi-line strings, code), save the JSON to a file and use:
unity-mcp-cli run-tool reflection-method-call --input-file args.jsonOr pipe via stdin (recommended):
unity-mcp-cli run-tool reflection-method-call --input-file - <<'EOF' {"param": "value"} EOF
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.