reflection-method-call

Invoke C# methods, including private ones, via reflection.

Updated Aug 26, 2025
One-click install
npx skills add https://github.com/infotechsrealm/PanicAtThePond --skill reflection-method-call-infotechsrealm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reflection-method-call
Source: https://github.com/infotechsrealm/PanicAtThePond/tree/main/.claude/skills/reflection-method-call
Command: npx skills add https://github.com/infotechsrealm/PanicAtThePond --skill reflection-method-call-infotechsrealm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill allows you to call C# methods, including private ones, by using reflection. It simplifies the process of interacting with code at a deeper level, enabling dynamic method invocation.

Core Features & Use Cases

  • Method Invocation: Call any C# method, even private ones, using a method schema.
  • Static and Instance Methods: Supports both static and instance methods, with options for target deserialization.
  • Execution Control: Offers control over whether the method should be executed on the main thread or off-thread.
  • Use Case: Imagine you need to access a private method of a class within your Unity project to perform a specific task. This Skill can dynamically invoke that method without modifying the class.

Quick Start

Use the reflection-method-call skill to call the private method 'GetSecretData' on the 'SecretClass' instance.

Frequently Asked Questions about reflection-method-call

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call private C# methods in Unity using reflection?▼

Dynamically invoke private C# methods using reflection by defining a method schema. This allows deep code interaction and dynamic access without modifying the target class structure.

Can I invoke static and instance methods dynamically in C#?▼

Yes, dynamic method invocation supports both static and instance methods in C#. It includes options for target deserialization, allowing flexible execution control over the invoked method.

Does reflection method invocation support main thread and off-thread execution?▼

Reflection method invocation offers execution control options to run methods either on the main thread or off-thread. This ensures compatibility with Unity projects requiring specific thread management.

What is the best way to access private class methods without changing the source code?▼

Using reflection to dynamically invoke private methods is the best way to access them without changing source code. You simply supply a method schema to execute the target function safely.

When do I need to use dynamic method invocation with reflection in C#?▼

You need dynamic method invocation with reflection when accessing internal or private C# methods at runtime. It is particularly useful in Unity projects for triggering hidden functionalities without class modifications.