# API Upgrades

## **Upgrading To Version 2.3.0**

### Blueprints

* Renamed `OnCleanupSession` event to `OnCleanupForDisconnectComplete` in `KronosOnlineSession`.
* Renamed `GetInitialReplicationProps` function to `HasInitialReplicationFinished` in `KronosPartyClient`.

### C++

Same as blueprint changes above.

## **Upgrading To Version 2.0.0**

### **Blueprints**

* `KronosIdentity` node no longer exists. Please use `GetKronosUserManager` instead.
* `KronosFriends` node no longer exists. Please use `GetKronosUserManager` instead.
* `KronosMatchmaking` node no longer exists. Please use `GetKronosMatchmakingManager` instead.
* `KronosParty` node no longer exists. Please use `GetKronosPartyManager` instead.
* As a result of replacing these nodes, you will need to re-assign events that were bound to these objects. For example if you had an event bound to KronosParty -> OnConnectedToParty, you'll need to change it to GetKronosPartyManager -> OnConnectedToParty.
* `GetKronosOnlineSession` function no longer exists in `KronosStatics`. A global accessor has been added to the class itself instead. The new node has the same name as before.
* `LoginUser` async node no longer exists. Login is now handled as part of user authentication. You can start user authentication manually via the `AuthenticateUser` function in `KronosUserManager`.
* `LogoutUser` async node no longer exists. Logout can be requested via the `LogoutUser` function in `KronosUserManager`.

### C++

Subsystems have been replaced by online managers:

```cpp
// Previous API:
GameInstance->GetSubsystem<UKronosIdentitySubsystem>();
GameInstance->GetSubsystem<UKronosFriendsSubsystem>();
GameInstance->GetSubsystem<UKronosMatchmakingSubsystem>();
GameInstance->GetSubsystem<UKronosPartySubsystem>();

// New API:
UKronosUserManager::Get(this); // identity + friends
UKronosMatchmakingManager::Get(this);
UKronosPartyManager::Get(this);
```

Removed `GetKronosOnlineSession` from `KronosStatics`:

```cpp
// Previous API:
UKronosStatics::GetKronosOnlineSession();

// New API:
UKronosOnlineSession::Get(this);
```

Delegates are now only accessible through dedicated accessor functions. Please note that some delegate names have been slightly rephrased for better naming consistency. Here are some of the changes (not a comprehensive list):

```cpp
// Previous API:
MatchmakingSubsystem->OnStartMatchmakingComplete.AddDynamic(...);
MatchmakingSubsystem->OnMatchmakingComplete.AddDynamic(...);
PartySubsystem->OnPlayerJoinedParty.AddDynamic(...);
PartySubsystem->OnPlayerLeftParty.AddDynamic(...);
KronosNameplateComponent->OnKronosNameplateCreated().AddDynamic(...);

// New API:
MatchmakingManager->OnMatchmakingStarted().AddDynamic(...); // renamed slightly
MatchmakingManager->OnMatchmakingComplete().AddDynamic(...);
PartyManager->OnPlayerJoinedParty().AddDynamic(...);
PartyManager->OnPlayerLeftParty().AddDynamic(...);
KronosNameplateComponent->OnNameplateCreated().AddDynamic(...); // renamed slightly
```

Changed include path of `KronosNameplateComponent`:

```cpp
// Previous API:
#include "Lobby/KronosNameplateComponent.h"

// New API:
#include "Components/KronosNameplateComponent.h"
```

Renamed `GetPlayerNickname` function in old `KronosIdentitySubsystem`:

```cpp
// Previous API
IdentitySubsystem->GetPlayerNickname();

// New API:
UserManager->GetUserNickname();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://horizongames.gitbook.io/kronos-matchmaking/changelog/api-upgrades.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
