DeserializeSynchronizationTypeState
How do I use Deserialize Synchronization Type State
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
417 | void DeserializeSynchronizationTypeState( PhotonStream stream ) | 1 |
464 | DeserializeSynchronizationTypeState( stream ); | 2 |
File name: PhotonAnimatorView.cs
Copy
417 void DeserializeSynchronizationTypeState( PhotonStream stream )
418 {
419 byte[] state = (byte[])stream.ReceiveNext();
420
421 for( int i = 0; i < m_SynchronizeLayers.Count; ++i )
422 {
423 m_SynchronizeLayers[ i ].SynchronizeType = (SynchronizeType)state[ i ];
424 }
425
426 for( int i = 0; i < m_SynchronizeParameters.Count; ++i )
427 {
428 m_SynchronizeParameters[ i ].SynchronizeType = (SynchronizeType)state[ m_SynchronizeLayers.Count + i ];
429 }
430 }
File name: PhotonAnimatorView.cs
Copy
432 void OnPhotonSerializeView( PhotonStream stream, PhotonMessageInfo info )
433 {
434 if( m_Animator == null )
435 {
436 return;
437 }
438
439 if( stream.isWriting == true )
440 {
441 if( m_WasSynchronizeTypeChanged == true )
442 {
443 m_StreamQueue.Reset();
444 SerializeSynchronizationTypeState( stream );
445
446 m_WasSynchronizeTypeChanged = false;
447 }
448
449 m_StreamQueue.Serialize( stream );
450 SerializeDataDiscretly( stream );
451 }
452 else
453 {
454#if PHOTON_DEVELOP
455 if( ReceivingSender != null )
456 {
457 ReceivingSender.OnPhotonSerializeView( stream, info );
458 }
459 else
460#endif
461 {
462 if( stream.PeekNext() is byte[] )
463 {
464 DeserializeSynchronizationTypeState( stream );
465 }
466
467 m_StreamQueue.Deserialize( stream );
468 DeserializeDataDiscretly( stream );
469 }
470 }
471 }
DeserializeSynchronizationTypeState 142 lượt xem
Gõ tìm kiếm nhanh...