|
WjWorld
|
#include <SessionManager.h>
Public Member Functions | |
| USessionManager () | |
| void | Initialize () |
| void | Shutdown () |
| bool | CreateSession (const FRoomSettings &Settings) |
| bool | FindSessions (int32 MaxSearchResults=100) |
| bool | JoinSession (int32 RoomIndex) |
| bool | StartSession () |
| bool | EndSession () |
| bool | DestroySession () |
| bool | IsInSession () const |
| bool | IsHost () const |
| const FRoomSettings & | GetLastRoomSettings () const |
| bool | CreateMigrationSession (const FRoomSettings &Settings, const FString &MigrationTag) |
| bool | FindMigrationSession (const FString &MigrationTag) |
Public Attributes | |
| FOnRoomCreated | OnRoomCreatedEvent |
| FOnRoomsFound | OnRoomsFoundEvent |
| FOnRoomJoined | OnRoomJoinedEvent |
| FOnRoomDestroyed | OnRoomDestroyedEvent |
| FOnRoomStarted | OnRoomStartedEvent |
| FOnRoomEnded | OnRoomEndedEvent |
Online Subsystem Session 관리 클래스
역할:
| USessionManager::USessionManager | ( | ) |
| bool USessionManager::CreateMigrationSession | ( | const FRoomSettings & | Settings, |
| const FString & | MigrationTag ) |
마이그레이션 세션 생성 (MIGRATION_TAG 커스텀 세팅 포함)
| Settings | 방 설정 |
| MigrationTag | 마이그레이션 식별 태그 |
| bool USessionManager::CreateSession | ( | const FRoomSettings & | Settings | ) |
세션(방) 생성
| Settings | 방 설정 |
| bool USessionManager::DestroySession | ( | ) |
세션 나가기/방 파괴
| bool USessionManager::EndSession | ( | ) |
세션 종료 (InProgress 상태를 Ended로 변경) Play → WaitingRoom 복귀 시 호출하여 다시 StartSession 가능하게 함
| bool USessionManager::FindMigrationSession | ( | const FString & | MigrationTag | ) |
마이그레이션 세션 검색 (MIGRATION_TAG로 필터링)
| MigrationTag | 검색할 마이그레이션 태그 |
| bool USessionManager::FindSessions | ( | int32 | MaxSearchResults = 100 | ) |
세션(방) 검색
| MaxSearchResults | 최대 검색 결과 수 |
|
inline |
마지막 방 설정 가져오기
| void USessionManager::Initialize | ( | ) |
초기화 (GameInstance에서 호출)
|
inline |
호스트인지 확인
|
inline |
현재 세션에 있는지 확인
| bool USessionManager::JoinSession | ( | int32 | RoomIndex | ) |
세션(방) 참가
| RoomIndex | 검색 결과에서의 인덱스 |
| void USessionManager::Shutdown | ( | ) |
정리
| bool USessionManager::StartSession | ( | ) |
세션 시작 (방장만 가능)
| FOnRoomCreated USessionManager::OnRoomCreatedEvent |
| FOnRoomDestroyed USessionManager::OnRoomDestroyedEvent |
| FOnRoomEnded USessionManager::OnRoomEndedEvent |
| FOnRoomJoined USessionManager::OnRoomJoinedEvent |
| FOnRoomsFound USessionManager::OnRoomsFoundEvent |
| FOnRoomStarted USessionManager::OnRoomStartedEvent |