Space Plunder
Loading...
Searching...
No Matches
EOSTutorialGameInstance.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Engine/GameInstance.h"
7#include "Interfaces/OnlineSessionInterface.h"
8#include "OnlineSessionSettings.h"
9#include "VoiceChat.h"
10#include "EOSTutorialGameInstance.generated.h"
11
12
13UCLASS()
14class SPACEADVENTURE_API UEOSTutorialGameInstance : public UGameInstance
15{
16 GENERATED_BODY()
17
18public:
19
20 virtual void Init() override;
21
22
23 UFUNCTION(BlueprintCallable, Category="EOS")
24 void LoginWithEOS(FString ID, FString Token, FString LoginType);
25 UFUNCTION(BlueprintPure, Category="EOS")
26 FString GetPlayerUserName();
27 UFUNCTION(BlueprintPure, Category="EOS")
28 bool GetIsPlayerLoggedIn();
29 UFUNCTION(BlueprintCallable, Category="EOS")
30 FName GetCurrentSessionName();
31
32 UFUNCTION(BlueprintCallable, Category="EOS")
33 void CreateEOSSession(FName SessionName,bool bIsDedicatedServer, bool bIsLAN, bool bIsPresence, int32 MaxNumPlayers);
34
35
36
37 UFUNCTION(BlueprintCallable, Category="EOS")
38 void FindSessionAndJoin();
39 // UFUNCTION(BlueprintCallable, Category="EOS")
40 // void JoinSession();
41
42 UFUNCTION(BlueprintCallable, Category="EOS")
43 void DestroySession();
44
45
46 TSharedPtr<FOnlineSessionSearch> OnlineSessionSearch;
47
48
49 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="EOS")
50 FString OpenLevelText;
51
52 void OnLoginEOSCompleted(int32 LocalUserNum, bool bSuccess, const FUniqueNetId& UserID, const FString& Error);
53 void OnCreateSessionCompleted(FName SessionName, bool bSuccess);
54 void OnDestroySessionCompleted(FName SessionName, bool bSuccess);
55 void OnFindSessionCompleted(bool bSuccess);
56 void OnJoinSessionCompleted(FName SessionName, EOnJoinSessionCompleteResult::Type Result);
57
58 //- Voice Chat //
59
60
61 UFUNCTION(BlueprintCallable, Category="EOS")
62 void EOSVoiceChatLogin();
63
64 void OnVoiceChatLoginCompleted(const FString& PlayerName,const FVoiceChatResult& Result);
65
66 IVoiceChatUser* VoiceChatUser;
67
68 UFUNCTION(BlueprintCallable, Category="EOS")
69 void SetInputVolumeEOS(float NewVolume);
70 UFUNCTION(BlueprintCallable, Category="EOS")
71 void SetMuteInputVolumeEOS(bool bIsMuted);
72
73 UFUNCTION(BlueprintCallable, Category="EOS")
74 void SetInputOutputMode(int32 Value);
75
76
77private:
78 FName CurrentSessionName;
79};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition EOSTutorialGameInstance.h:15
TSharedPtr< FOnlineSessionSearch > OnlineSessionSearch
Definition EOSTutorialGameInstance.h:46