Exemple #1
0
    public override void Connected(BoltConnection connection)
    {
        var evnt = HostMigrationEvent.Create();

        evnt.isServer     = false;
        evnt.connectionId = (int)connection.ConnectionId;
        currentSession    = evnt.sessionName;
        evnt.Send();
    }
Exemple #2
0
    IEnumerator UpdateEntityAndSessionName()
    {
        yield return(null);

        var myUpdate = HostMigrationEvent.Create();

        myUpdate.position    = myEntity.transform.position;
        myUpdate.rotation    = myEntity.transform.rotation.eulerAngles;
        myUpdate.sessionName = currentSession;
        myUpdate.Send();
    }