// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "HAL/Platform.h" #include "Kismet/BlueprintFunctionLibrary.h" #include "UObject/UObjectGlobals.h" #include "LyraActorUtilities.generated.h" class UObject; struct FFrame; UENUM() enum class EBlueprintExposedNetMode : uint8 { /** Standalone: a game without networking, with one or more local players. Still considered a server because it has all server functionality. */ Standalone, /** Dedicated server: server with no local players. */ DedicatedServer, /** Listen server: a server that also has a local player who is hosting the game, available to other players on the network. */ ListenServer, /** * Network client: client connected to a remote server. * Note that every mode less than this value is a kind of server, so checking NetMode < NM_Client is always some variety of server. */ Client }; UCLASS() class ULyraActorUtilities : public UBlueprintFunctionLibrary { GENERATED_BODY() public: /** * Get the network mode (dedicated server, client, standalone, etc...) for an actor or component. */ UFUNCTION(BlueprintCallable, Category="Lyra", meta=(WorldContext="WorldContextObject", ExpandEnumAsExecs=ReturnValue)) static EBlueprintExposedNetMode SwitchOnNetMode(const UObject* WorldContextObject); };