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
  3. Functions

Flags

Attribute flags for UFunction and their purpose

PreviousFunctionsNextMetaData

Last updated 8 months ago

Function Flag
Effect

BlueprintAuthorityOnly

This function will only execute from Blueprint code if running on a machine with network authority (a server, dedicated server, or single-player game).

BlueprintCallable

The function can be executed in a Blueprint or Level Blueprint graph.

BlueprintCosmetic

This function is cosmetic and will not run on dedicated servers.

BlueprintEvent

This function is designed to be overridden by a Blueprint, but also has a default C# implementation.

BlueprintPure

The function does not affect the owning object in any way and can be executed in a Blueprint or Level Blueprint graph.

Pure functions do not cache their results, therefore you should be cautious when doing any non-trivial amount of work with a blueprint function. It is good practice to avoid outputting array properties in Blueprint pure functions.

Client

The function is only executed on the client that owns the Object on which the function is called.

Exec

The function can be executed from the in-game console. Exec commands only function when declared within certain Classes.

NetMulticast

The function is executed both locally on the server, and replicated to all clients, regardless of the Actor's NetOwner.

Reliable

The function is replicated over the network, and is guaranteed to arrive regardless of bandwidth or network errors. Only valid when used in conjunction with Client or Server.

Server

The function is only executed on the server.

Metadata Specifiers

[UFunction(FunctionFlags.BlueprintPure)]
public int BlueprintPureFunction()
{
  return 1;
}
[UFunction(FunctionFlags.BlueprintCallable)]
public int BlueprintCallableFunction()
{
return 1;
}