Allocate Callback is a cold processing mechanism,
I was testing the Allocate event yesterday and received it once,
The next test did not receive the Allocate event.
Then I looked at the FusionBr200 project,
It is written in Start connecting to the game directly after SubscribeToServerEventsAsync
And it says: “It’s possible this is a cold start allocation”,
I laughed out loud on the spot.
So here are some references for you, thank you.
// Setup allocations
_multiplayEventCallbacks = new MultiplayEventCallbacks();
_multiplayEventCallbacks.Allocate += OnAllocate;
_multiplayEventCallbacks.Deallocate += OnDeallocate;
_multiplayEventCallbacks.Error += OnError;
_serverEvents = await MultiplayService.Instance.SubscribeToServerEventsAsync(_multiplayEventCallbacks);
// It's possible this is a cold start allocation (no event will fire)
if (!string.IsNullOrEmpty(MultiplayService.Instance.ServerConfig.AllocationId))
{
await StartGame();
}