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
  • Subsystem names in UnrealSharp
  • Getting Subsystems
  1. Documentation

Subsystems

UnrealSharp supports any of the engine’s subsytem classes. These classes are great way to create singletons in Unreal Engine.

Subsystem names in UnrealSharp

The only difference is that you need to inherit from the CS wrapper, due to the lack of reflection exposed functions in the engine’s subsystem classes.

// This WorldSubsystem supports Tick aswell. UTickableWorldSubsystem doesn't exist in UnrealSharp.
UWorldSubsystem => UCSWorldSubsystem

UGameInstanceSubsystem => UCSGameInstanceSubsystem

UEngineSubsystem => UCSEngineSubsystem

ULocalPlayerSubsystem => UCSLocalPlayerSubsystem

Getting Subsystems

Getting the subsystems are really simple, you just do any of the following, depending on what type of subsystem you inherit from:

GetWorldSubsystem<UMyWorldSubsystem>();
GetGameInstanceSubsystem<UMyGameInstanceSubsystem>();
GetLocalPlayerSubsystem<UMyLocalPlayerSubsystem>(OwningPlayerController);
GetEngineSubsystem<UMyEngineSubsystem>();
PreviousExtension / Mixin MethodsNextModule Lifecycle

Last updated 8 months ago