fix: server project not building properly

This commit is contained in:
2025-10-26 19:50:46 +03:00
parent 3ee3e9270f
commit cd65d47d26

View File

@@ -11,7 +11,7 @@ using Engine.Systems.Network;
namespace Server;
public class Endpoints : Behaviour, IFirstFrameUpdate
public class Endpoints : Behaviour, IFirstFrameUpdate, ILastFrameUpdate
{
private INetworkCommunicatorServer? server = null!;
@@ -36,5 +36,5 @@ public class Endpoints : Behaviour, IFirstFrameUpdate
private IResult GetStats() => Results.Json(new { Count = server?.Connections.Count ?? 0 });
public void FirstActiveFrame() => server = Universe.FindRequiredBehaviour<INetworkCommunicatorServer>();
protected override void OnExitedUniverse(IUniverse universe) => server = null;
public void LastActiveFrame() => server = null;
}