@@ -360,17 +360,14 @@ private struct PacketLossCache
360360 /// TODO-FIXME:
361361 /// Multiplayer Tools subscribes to this event and does not have the EntityId udpate.
362362 /// </summary>
363- #if FIXED
364- #if UNITY_6000_2_OR_NEWER
363+
364+ #if UNITY_6000_2_OR_NEWER && MP_TOOLS_2_2_8_OR_HIGHER
365365 internal static event Action<EntityId, NetworkDriver> TransportInitialized;
366366 internal static event Action<EntityId> TransportDisposed;
367367#else
368368 internal static event Action<int, NetworkDriver> TransportInitialized;
369369 internal static event Action<int> TransportDisposed;
370370#endif
371- #endif
372- internal static event Action<int, NetworkDriver> TransportInitialized;
373- internal static event Action<int> TransportDisposed;
374371
375372 /// <summary>
376373 /// Provides access to the <see cref="NetworkDriver"/> for this instance.
@@ -448,14 +445,12 @@ private void InitDriver()
448445 out m_UnreliableSequencedFragmentedPipeline,
449446 out m_ReliableSequencedPipeline);
450447#if UNITY_6000_2_OR_NEWER
448+ #if MP_TOOLS_2_2_8_OR_HIGHER
451449 var entityId = GetEntityId();
452- #if UNITY_6000_3_0A6_OR_HIGHER
453- // TODO-FIXME: Since multiplayer tools subscribes to this and we have to validate against any package that
454- // might use this action, we have to cast it down temporarily to avoid being blocked from getting these fixes in place.
455- TransportInitialized?.Invoke((int)entityId.GetRawData(), m_Driver);
456450#else
457- TransportInitialized?.Invoke( entityId, m_Driver );
451+ var entityId = GetEntityId().GetHashCode( );
458452#endif
453+ TransportInitialized?.Invoke(entityId, m_Driver);
459454#else
460455 TransportInitialized?.Invoke(GetInstanceID(), m_Driver);
461456#endif
@@ -476,15 +471,12 @@ private void DisposeInternals()
476471 m_SendQueue.Clear();
477472
478473#if UNITY_6000_2_OR_NEWER
474+ #if MP_TOOLS_2_2_8_OR_HIGHER
479475 var entityId = GetEntityId();
480- #if UNITY_6000_3_0A6_OR_HIGHER
481- // TODO-FIXME: Since multiplayer tools subscribes to this and we have to validate against any package that
482- // might use this action, we have to cast it down temporarily to avoid being blocked from getting these fixes in place.
483- TransportDisposed?.Invoke((int)entityId.GetRawData());
484476#else
485- TransportDisposed?.Invoke( entityId, m_Driver );
477+ var entityId = GetEntityId().GetHashCode( );
486478#endif
487-
479+ TransportDisposed?.Invoke(entityId);
488480#else
489481 TransportDisposed?.Invoke(GetInstanceID());
490482#endif
0 commit comments