# Functions

### **Blueprint-Callable Functions**

Use `BlueprintCallable` (or other call-related flags like `BlueprintPure`, etc.) to allow Blueprint graphs to invoke your C# method.

```csharp
// Can be called from BP
[UFunction(FunctionFlags.BlueprintCallable)]
public void MyBPCallableFunction(IList<int> myList)
{
    
}
```

Notes:

* Accepts normal managed types (`int`, `float`, `IList<T>`, etc.) as long as they can be marshalled.

***

### Blueprint-Overridable Functions (Events)

To allow Blueprint subclasses to override a C# function, UnrealSharp uses a **partial method pair**:

* A *declaration* marked with `BlueprintEvent`.
* An automatically-generated `*_Implementation` method stub you can override on the C# side.

```csharp
// Declares a function that Blueprint subclasses may override.
[UFunction(FunctionFlags.BlueprintEvent)]
public partial void MyBPOverridableFunction(IList<int> myList);

// The default implementation on the C# side.
public partial void MyBPOverridableFunction_Implementation(IList<int> myList)
{
    // Default behavior
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.unrealsharp.com/unreal-framework/classes/functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
