Skip to content

Commit

Permalink
Merge pull request #119 from replay_custom_data
Browse files Browse the repository at this point in the history
Custom data support for replays

(cherry picked from commit 62eab22)
  • Loading branch information
NSGolova authored and Hermanest committed Sep 12, 2024
1 parent 9eade19 commit 2ac7055
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/2_Core/Replayer/ReplayerLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public class ReplayerLauncher : MonoBehaviour {

public static event Action<ReplayLaunchData>? ReplayWasStartedEvent;
public static event Action<ReplayLaunchData>? ReplayWasFinishedEvent;

public static byte[]? GetMainReplayCustomData(string key) {
var dictionary = LaunchData?.MainReplay?.CustomData;

if (!IsStartedAsReplay || dictionary == null || !dictionary.ContainsKey(key)) {
return default;
}

return dictionary[key];
}

public static byte[]? GetMainReplayCustomData(string key) {
var dictionary = LaunchData?.MainReplay?.CustomData;
Expand Down

0 comments on commit 2ac7055

Please sign in to comment.