File size: 1,292 Bytes
7fd553e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.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);
};
|