AdditionalClass 

    Namespace: SynicSugar.P2P

    Description 

    The partial class that has NetworkPlayer or NetworkCommons is generated an additional part for the connection by SourceGenerator.
    If we use VisualStudio or Rider, wa can read these parts from the Reference -> Analyzer.
    Some may be moved to ILPostProcess for security.

    Both 

    APIdescription
    SynicSugarRpc_XXXFor RPC and TargetRpc
    SynicXXXFor SyncVar
    StartSynicXXXFor SyncVar
    isWaitingXXXFor SyncVar

    NetworkPlayer 

    APIdescription
    isLocalIf this instance is operated in this local, return true
    OwnerUserIDThis instance owner' UserID
    SetOwnerIDSet UserID to this instance

    NetworkCommons 

    APIdescription
    isHostIf this Local is Lobby Host, return true
    isRemotoCallNot to Sync again the RPC on remote call
    // <auto-generated>
    // THIS (.cs) FILE IS GENERATED BY SynicSugarGenerator. DO NOT CHANGE IT.
    // </auto-generated>
    using UnityEngine;
    using SynicSugar.P2P;
    using System;
    using System.Threading;
    using Cysharp.Threading.Tasks;
    
    public partial class SampleClass : INetworkOwner, IGetPlayer {
        UserId _ownerUserID;
        public UserId OwnerUserID {
            get { return _ownerUserID; }
            set {
                _ownerUserID = new UserId(value);
                ConnectHub.Instance.RegisterInstance(_ownerUserID, this);
            }
        }
        public void SetOwnerID(UserId value){
            OwnerUserID = value;
        }
        /// <summary>
        /// Is this the instance's local? Invalid in Awake. 
        /// </summary>
        public bool isLocal { get { return _ownerUserID == p2pConfig.Instance.userIds.LocalUserId; } }
    
        //
        //
    }