MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Subsystems.h File Reference
#include "CoreMinimal.h"
#include "Mcro/Concepts.h"
#include "Mcro/AssertMacros.h"
#include "Kismet/GameplayStatics.h"

Go to the source code of this file.

Namespaces

namespace  Mcro
 
namespace  Mcro::Subsystems
 
namespace  Mcro::Subsystems::Subsystems
 Extra namespace encapsulates common vocabulary.
 

Concepts

concept  Mcro::Subsystems::CSubsystem
 
concept  Mcro::Subsystems::CEngineSubsystem
 
concept  Mcro::Subsystems::CGameInstanceSubsystem
 
concept  Mcro::Subsystems::CLocalPlayerSubsystem
 
concept  Mcro::Subsystems::CWorldSubsystem
 

Enumerations

enum class  Mcro::Subsystems::EGameInstanceFallback { Mcro::Subsystems::UseGameViewport , Mcro::Subsystems::UseFirstWorldContext }
 

Functions

template<CEngineSubsystem T>
T * Mcro::Subsystems::Subsystems::Get ()
 Helper for getting a subsystem, the internal boilerplate will be chosen based on the type of subsystem T inherits from. Required arguments may vary depending on the type of subsystem.
 
template<CGameInstanceSubsystem T>
T * Mcro::Subsystems::Subsystems::Get (const UObject *worldContextObject=nullptr, EGameInstanceFallback fallback=EGameInstanceFallback::UseGameViewport, EGetWorldErrorMode errorMode=EGetWorldErrorMode::LogAndReturnNull)
 Helper for getting a subsystem, the internal boilerplate will be chosen based on the type of subsystem T inherits from. Required arguments may vary depending on the type of subsystem.
 
template<CLocalPlayerSubsystem T>
T * Mcro::Subsystems::Subsystems::Get (const UObject *worldContext)
 Helper for getting a subsystem, the internal boilerplate will be chosen based on the type of subsystem T inherits from. Required arguments may vary depending on the type of subsystem.
 
template<CWorldSubsystem T>
T * Mcro::Subsystems::Subsystems::Get (const UObject *worldContext, EGetWorldErrorMode errorMode=EGetWorldErrorMode::LogAndReturnNull)
 Helper for getting a subsystem, the internal boilerplate will be chosen based on the type of subsystem T inherits from. Required arguments may vary depending on the type of subsystem.
 
template<CSubsystem T, typename... Args>
T & Mcro::Subsystems::Subsystems::GetChecked (Args... args)
 Helper for getting a subsystem, the internal boilerplate will be chosen based on the type of subsystem T inherits from. Required arguments may vary depending on the type of subsystem. This is a checked version so if any steps fail to produce the target subsystem the program may crash.
 
template<CSubsystem T, typename... Args>
T * Mcro::Subsystems::Subsystems::GetEnsured (Args... args)
 Helper for getting a subsystem, the internal boilerplate will be chosen based on the type of subsystem T inherits from. Required arguments may vary depending on the type of subsystem. This is an ensured version so if any steps fail to produce the target subsystem an ensure may be hit.
 
template<CSubsystem T>
bool Mcro::Subsystems::Subsystems::ShouldCreate (UObject *outer)
 Helper for checking if some other subsystem should be created. Useful when you want to make a subsystem which should only be created if some other subsystem should be also created.
 

Detailed Description

Author
David Mórász
Date
2025

Definition in file Subsystems.h.