Skip to content

UOperatingSystemWorldSubsystem

#include <OperatingSystemSimulator/Public/Subsystems/OperatingSystemWorldSubsystem.h>
class UOperatingSystemWorldSubsystem

Defined in OperatingSystemWorldSubsystem.h:18

Inherits: UWorldSubsystem

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemWorldSubsystem["UOperatingSystemWorldSubsystem"]
  class UWorldSubsystem["UWorldSubsystem"]
  UWorldSubsystem <|-- UOperatingSystemWorldSubsystem
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemWorldSubsystem["UOperatingSystemWorldSubsystem"]
  class AOperatingSystemDeviceActor["AOperatingSystemDeviceActor"]
  UOperatingSystemWorldSubsystem *-- AOperatingSystemDeviceActor
  class UOperatingSystemUserManager["UOperatingSystemUserManager"]
  UOperatingSystemWorldSubsystem *-- UOperatingSystemUserManager
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemWorldSubsystem {
    +UOperatingSystemWorldSubsystem()
    +Initialize(FSubsystemCollectionBase &Collection) overr
    +Deinitialize() override
    +RegisterDeviceActor(AOperatingSystemDeviceActor *DeviceActor)
    +UnregisterDeviceActor(AOperatingSystemDeviceActor *DeviceActor)
    +FindDeviceActorByTag(const FGameplayTag TestTag) AOperatingSystemDeviceActor() *
    +FindDeviceActorsByTag(const FGameplayTag TestTag, TArray< AOperat
    +GetUserManager() const UOperatingSystemUserManager() *
    +SetTargetTexture(UTextureRenderTarget2D *TargetTexture) cons
    +DrawWidget(UUserWidget *Widget, const bool bDeferUpdat bool
    +Get(const UObject *WorldContextObject) UOperatingSystemWorldSubsystem() *
    +RegisteredDeviceActors : TArray< TWeakObjectPtr< AOperatingSystem
    +UserManager : TObjectPtr< UOperatingSystemUserManager(
    +OperatingSystemWidgetDrawerPtr : FOperatingSystemWidgetDrawerPtr()
  }

Documented call sites inside the plugin (5):

flowchart LR
  UOperatingSystemWorldSubsystem__Get["UOperatingSystemWorldSubsystem::Get"]
  UOperatingSystemStatics__DrawWidgetToTexture["UOperatingSystemStatics::DrawWidgetToTexture"]
  UOperatingSystemStatics__DrawWidgetToTexture --> UOperatingSystemWorldSubsystem__Get
  UOperatingSystemStatics__FindDeviceActorByTag["UOperatingSystemStatics::FindDeviceActorByTag"]
  UOperatingSystemStatics__FindDeviceActorByTag --> UOperatingSystemWorldSubsystem__Get
  UOperatingSystemStatics__FindDeviceActorsByTag["UOperatingSystemStatics::FindDeviceActorsByTag"]
  UOperatingSystemStatics__FindDeviceActorsByTag --> UOperatingSystemWorldSubsystem__Get
  UOperatingSystemStatics__FindMessengerForDevice["UOperatingSystemStatics::FindMessengerForDevice"]
  UOperatingSystemStatics__FindMessengerForDevice --> UOperatingSystemWorldSubsystem__Get
  UOperatingSystemStatics__GetUserManager["UOperatingSystemStatics::GetUserManager"]
  UOperatingSystemStatics__GetUserManager --> UOperatingSystemWorldSubsystem__Get

UOperatingSystemWorldSubsystem class is a subsystem of the game world that manages the operating system functionality.

ReturnNameDescription
UOperatingSystemWorldSubsystem
voidInitialize virtual override
voidDeinitialize virtual override
voidRegisterDeviceActorThis method adds the specified device actor to the RegisteredDeviceActors array of the operating system world subsystem.
voidUnregisterDeviceActorThis method removes the specified device actor from the RegisteredDeviceActors array of the operating system world subsystem. The array consists of weak pointers to AOperatingSystemDeviceActor instances that are registered with the subsystem.
AOperatingSystemDeviceActor *FindDeviceActorByTagSearches for a device actor in the registered device actors based on the provided tag. If a matching device actor is found, it is returned. If the provided tag is not valid, an error message is logged and null is returned. If no device actor is found with the provided tag, a warning message is logged and null is returned.
voidFindDeviceActorsByTagSearches for device actors in the registered device actors based on the provided tag. If matching device actors are found, they are added to the OutDeviceActors array. If the provided tag is not valid, an error message is logged and the array remains empty. If no device actors are found with the provided tag, a warning message is logged and the array remains empty.
UOperatingSystemUserManager *GetUserManager constGet the user manager instance.
voidSetTargetTexture const inlineSets the target texture for the operating system widget drawer.
boolDrawWidget const inlineDraws the specified widget using the operating system widget drawer.

UOperatingSystemWorldSubsystem()

Defined in OperatingSystemWorldSubsystem.h:43

Section titled “Defined in OperatingSystemWorldSubsystem.h:43”

virtual override

virtual void Initialize(FSubsystemCollectionBase & Collection) override

Defined in OperatingSystemWorldSubsystem.h:45


virtual override

virtual void Deinitialize() override

Defined in OperatingSystemWorldSubsystem.h:46


void RegisterDeviceActor(AOperatingSystemDeviceActor * DeviceActor)

Defined in OperatingSystemWorldSubsystem.h:61 This method adds the specified device actor to the RegisteredDeviceActors array of the operating system world subsystem.


void UnregisterDeviceActor(AOperatingSystemDeviceActor * DeviceActor)

Defined in OperatingSystemWorldSubsystem.h:69 This method removes the specified device actor from the RegisteredDeviceActors array of the operating system world subsystem. The array consists of weak pointers to AOperatingSystemDeviceActor instances that are registered with the subsystem.


AOperatingSystemDeviceActor * FindDeviceActorByTag(const FGameplayTag TestTag)

Defined in OperatingSystemWorldSubsystem.h:80 Searches for a device actor in the registered device actors based on the provided tag. If a matching device actor is found, it is returned. If the provided tag is not valid, an error message is logged and null is returned. If no device actor is found with the provided tag, a warning message is logged and null is returned.

  • TestTag The tag used to identify the device actor.

The device actor with the provided tag, or null if not found or if the tag is not valid.


void FindDeviceActorsByTag(const FGameplayTag TestTag, TArray< AOperatingSystemDeviceActor * > & OutDeviceActors)

Defined in OperatingSystemWorldSubsystem.h:91 Searches for device actors in the registered device actors based on the provided tag. If matching device actors are found, they are added to the OutDeviceActors array. If the provided tag is not valid, an error message is logged and the array remains empty. If no device actors are found with the provided tag, a warning message is logged and the array remains empty.

  • TestTag The tag used to identify the device actors.

  • OutDeviceActors The array to which the found device actors should be added.


const

UOperatingSystemUserManager * GetUserManager() const

Defined in OperatingSystemWorldSubsystem.h:98 Get the user manager instance.

The user manager instance.


const inline

inline void SetTargetTexture(UTextureRenderTarget2D * TargetTexture) const

Defined in OperatingSystemWorldSubsystem.h:105 Sets the target texture for the operating system widget drawer.

  • TargetTexture The UTextureRenderTarget2D instance representing the target texture.

const inline

inline bool DrawWidget(UUserWidget * Widget, const bool bDeferUpdate, const float DeltaTime) const

Defined in OperatingSystemWorldSubsystem.h:118 Draws the specified widget using the operating system widget drawer.

  • Widget The UUserWidget instance to be drawn.

  • bDeferUpdate Whether to defer the widget update.

  • DeltaTime The time since the last frame.

true if the widget was successfully drawn, false otherwise.

ReturnNameDescription
UOperatingSystemWorldSubsystem *Get staticRetrieves the instance of the UOperatingSystemWorldSubsystem class that is associated with the specified WorldContextObject.

static

static UOperatingSystemWorldSubsystem * Get(const UObject * WorldContextObject)

Defined in OperatingSystemWorldSubsystem.h:54 Retrieves the instance of the UOperatingSystemWorldSubsystem class that is associated with the specified WorldContextObject.

  • WorldContextObject The UObject instance representing the context of the world.

The UOperatingSystemWorldSubsystem instance associated with the WorldContextObject.

ReturnNameDescription
TArray< TWeakObjectPtr< AOperatingSystemDeviceActor > >RegisteredDeviceActorsTArray of weak pointers to AOperatingSystemDeviceActor instances that are registered with the operating system world subsystem.
TObjectPtr< UOperatingSystemUserManager >UserManagerPointer to an instance of the class UOperatingSystemUserManager. It manages the user functionality of the operating system world subsystem.
FOperatingSystemWidgetDrawerPtrOperatingSystemWidgetDrawerPtrFOperatingSystemWidgetDrawerPtr is a shared pointer to an instance of the FOperatingSystemWidgetDrawer class. It is used to manage the lifetime and access to the operating system widget drawer.

TArray< TWeakObjectPtr< AOperatingSystemDeviceActor > > RegisteredDeviceActors

Defined in OperatingSystemWorldSubsystem.h:26 TArray of weak pointers to AOperatingSystemDeviceActor instances that are registered with the operating system world subsystem.


TObjectPtr< UOperatingSystemUserManager > UserManager

Defined in OperatingSystemWorldSubsystem.h:33 Pointer to an instance of the class UOperatingSystemUserManager. It manages the user functionality of the operating system world subsystem.


FOperatingSystemWidgetDrawerPtr OperatingSystemWidgetDrawerPtr

Defined in OperatingSystemWorldSubsystem.h:39 FOperatingSystemWidgetDrawerPtr is a shared pointer to an instance of the FOperatingSystemWidgetDrawer class. It is used to manage the lifetime and access to the operating system widget drawer.