UnrealSharp
  • Home
  • FAQ
  • Getting Started
    • Setup
    • Your First Script
    • Debugging
    • Packaging
  • Documentation
    • Classes
      • Properties
        • C++ Functions As C# Properties
        • C++ Properties with Getters/Setters
      • Functions
        • Flags
        • MetaData
      • Default Actor Components
      • Helper Methods
    • Structs
    • Enums
    • Interfaces
    • Delegates
    • Collections
      • TArray
      • TNativeArray
      • TSet
      • TMap
    • Multiplayer
      • Replicated Properties
      • RPCs (Remote Procedure Calls)
      • Replicated UObjects
    • Primary Data Assets
      • Loading Primary Data Assets
    • Loading Soft References
    • Trace Channels
    • Static Variables
      • FWorldStaticVar<T>
      • FGameStaticVar<T>
    • Logging
    • Async
    • Gameplay Tags
      • Gameplay Tag Container
    • Extension / Mixin Methods
    • Subsystems
    • Module Lifecycle
  • Links
    • Github Repository
    • Roadmap
    • Discord
Powered by GitBook
On this page
  1. Documentation
  2. Classes

Functions

Exposing your C# methods to Unreal functions

You can expose your C# methods to unreal using the UFunction Attribute

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

// Can be overridden by Blueprint, but has a default implementation
// Virtual specifier is optional.
[UFunction(FunctionFlags.BlueprintEvent)]
public virtual void MyOverridableFunction(IList<int> myList)
{
    
}

// Can be overridden by Blueprint, but has no default implementation
[UFunction(FunctionFlags.BlueprintEvent)]
public void MyBPOverridableFunction(IList<int> myList);
PreviousC++ Properties with Getters/SettersNextFlags

Last updated 5 months ago