@@ -356,18 +356,9 @@ private struct PacketLossCache
356356 public float PacketLoss ;
357357 } ;
358358
359- /// <summary>
360- /// TODO-FIXME:
361- /// Multiplayer Tools subscribes to this event and does not have the EntityId udpate.
362- /// </summary>
363- #if FIXED
364359#if UNITY_6000_2_OR_NEWER
365- internal static event Action < EntityId , NetworkDriver > TransportInitialized ;
366- internal static event Action < EntityId > TransportDisposed ;
367- #else
368- internal static event Action < int , NetworkDriver > TransportInitialized ;
369- internal static event Action < int > TransportDisposed ;
370- #endif
360+ internal static event Action < EntityId , NetworkDriver > OnDriverInitialized ;
361+ internal static event Action < EntityId > OnDisposingDriver ;
371362#endif
372363 internal static event Action < int , NetworkDriver > TransportInitialized ;
373364 internal static event Action < int > TransportDisposed ;
@@ -449,13 +440,8 @@ private void InitDriver()
449440 out m_ReliableSequencedPipeline ) ;
450441#if UNITY_6000_2_OR_NEWER
451442 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 ) ;
456- #else
457- TransportInitialized ? . Invoke ( entityId , m_Driver ) ;
458- #endif
443+ OnDriverInitialized ? . Invoke ( entityId , m_Driver ) ;
444+ TransportInitialized ? . Invoke ( entityId . GetHashCode ( ) , m_Driver ) ;
459445#else
460446 TransportInitialized ? . Invoke ( GetInstanceID ( ) , m_Driver ) ;
461447#endif
@@ -477,14 +463,8 @@ private void DisposeInternals()
477463
478464#if UNITY_6000_2_OR_NEWER
479465 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 ( ) ) ;
484- #else
485- TransportDisposed ? . Invoke ( entityId , m_Driver ) ;
486- #endif
487-
466+ OnDisposingDriver ? . Invoke ( entityId ) ;
467+ TransportDisposed ? . Invoke ( entityId . GetHashCode ( ) ) ;
488468#else
489469 TransportDisposed ? . Invoke ( GetInstanceID ( ) ) ;
490470#endif
0 commit comments