Skip to content

Commit

Permalink
review: remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianStoll committed Nov 26, 2024
1 parent 33ec786 commit 6e83731
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions Assets/Scripts/UnityServices/Sessions/MultiplayerServicesFacade.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Unity.BossRoom.Infrastructure;
using Unity.Services.Authentication;
Expand Down Expand Up @@ -409,41 +408,6 @@ async void DeleteSessionAsync()
}
}

/// <summary>
/// Attempt to update the set of key-value pairs associated with a given session and unlocks it so clients can see it.
/// </summary>
public async Task UpdateSessionPropertiesAndUnlockAsync()
{
if (!m_LocalUser.IsHost)
{
return;
}

if (!m_RateLimitQuery.CanCall)
{
return;
}

var localData = m_LocalSession.GetDataForUnityServices();

var dataCurr = (Dictionary<string, SessionProperty>)CurrentUnitySession.Properties ?? new Dictionary<string, SessionProperty>();

foreach (var dataNew in localData)
{
dataCurr[dataNew.Key] = dataNew.Value;
}

try
{
CurrentUnitySession.AsHost().SetProperties(dataCurr);
await CurrentUnitySession.AsHost().SavePropertiesAsync();
}
catch (Exception e)
{
PublishError(e);
}
}

void PublishError(Exception e, bool checkIfDeleted = false)
{
if (e is not AggregateException aggregateException)
Expand Down

0 comments on commit 6e83731

Please sign in to comment.