6.1.0
版本发布时间: 2024-03-21 14:37:04
Cysharp/MagicOnion最新发布版本:6.1.4(2024-07-17 15:51:31)
Features
Add StreamingHub OnConnected support by @riversdark0 in https://github.com/Cysharp/MagicOnion/pull/745
Introduced the event OnConnected
after a connection is established with a client on the server's StreamingHub.
This differs from OnConnecting
in that the client is notified that the connection is complete and can then communicate via Broadcast.
Allow DynamicArgumentTuple as a reference type on Unity in https://github.com/Cysharp/MagicOnion/pull/747
This PR allows DynamicArgumentTuple as a reference type on Unity.
Unity IL2CPP builds often have issues with the code size due to generics and value types.
MAGICONION_USE_REFTYPE_DYNAMICARGUMENTTUPLE
build constant allows DynamicArgumentTuple
to be treated as a reference type.
[Preview] Introduce IStreamingHubDiagnosticHandler in https://github.com/Cysharp/MagicOnion/pull/746
This PR introduces an API for diagnosing and tracing the communication of StreamingHub. The API is in preview and may be subject to change in the future.
This API only supports the Source Generator at this moment and you need to set the EnableStreamingHubDiagnosticHandler
option to true
in the generation options. By setting this option, the StreamingHubDiagnosticHandler
property will be added to the generated class, allowing you to set a handler.
namespace MagicOnion.Client;
/// <summary>
/// [Preview] The interface of the handler for StreamingHub diagnostics. This API may change in the future.
/// </summary>
public interface IStreamingHubDiagnosticHandler
{
/// <summary>
/// The callback method at the beginning of a Hub method request. This API may change in the future.
/// </summary>
void OnRequestBegin<THub, TRequest>(THub hubInstance, Guid requestId, string methodName, TRequest request, bool isFireAndForget);
/// <summary>
/// [Preview] The callback method at the end of a Hub method request. This API may change in the future.
/// </summary>
void OnRequestEnd<THub, TResponse>(THub hubInstance, Guid requestId, string methodName, TResponse response);
/// <summary>
/// [Preview] The callback method when a method of HubReceiver is invoked. This API may change in the future.
/// </summary>
void OnBroadcastEvent<THub, T>(THub hubInstance, string methodName, T value);
}
What's Changed
Breaking Changes
- Move GenerateSerializerType into MagicOnionClientGenerationAttribute by @mayuki in https://github.com/Cysharp/MagicOnion/pull/748
Other Changes
- Update how share project in Unity by @neuecc in https://github.com/Cysharp/MagicOnion/pull/733
- Mark GrpcChannelProvider(GrpcChannelOptions) as Obsolete by @mayuki in https://github.com/Cysharp/MagicOnion/pull/734
- ci: Cysharp/Actions/.github/workflows/create-release.yaml by @guitarrapc in https://github.com/Cysharp/MagicOnion/pull/737
- ci: remove Ver. prefix for release by @guitarrapc in https://github.com/Cysharp/MagicOnion/pull/744
New Contributors
- @riversdark0 made their first contribution in https://github.com/Cysharp/MagicOnion/pull/745
Full Changelog: https://github.com/Cysharp/MagicOnion/compare/6.0.1...6.1.0
1、 MagicOnion.Client.Unity.unitypackage 267.33KB