void Start()
    {
        position.Value = 0;
        var channel = new Channel("192.168.212.97:5001", ChannelCredentials.Insecure);

        client = new Game.GameClient(channel);
    }
Exemple #2
0
    // Connect instantiates a new server connexion and instatiantes the main
    // character.
    public bool Connect(string endpoint)
    {
        if (endpoint == "")
        {
            endpoint = "[::1]:50051";
        }
        Debug.Log(endpoint);

        _grpc_channel = new Grpc.Core.Channel(
            endpoint, Grpc.Core.ChannelCredentials.Insecure);
        _client      = new Game.GameClient(_grpc_channel);
        is_connected = true;

        return(true);
    }