void Start() { server = GetComponent <SEDSS_Server>(); server.SetPassword(password); server.StartServer(); server.OnDataUploaded = (data, id) => { ReceiveData = new UTF8Encoding(false).GetString(data); ReceiveDataID = id; Debug.Log("Server data received ID:" + id); }; server.OnDownloadRequest = (id) => { Debug.Log("Server data send ID:" + id); SendDataID = id; return(new UTF8Encoding(false).GetBytes(SendData)); }; }
void Start() { server = GetComponent <SEDSS_Server>(); server.SetPassword(password); server.StartServer(); server.OnDataUploaded = (data, id) => { File.WriteAllBytes(ReceiveFilePath, data); ReceiveDataID = id; Debug.Log("Server data received ID:" + id); }; server.OnDownloadRequest = (id) => { Debug.Log("Server data send ID:" + id); SendDataID = id; return(File.ReadAllBytes(SendFilePath)); }; }
void Start() { externalReceiver = GetComponent <EVMC4U.ExternalReceiver>(); server = GetComponent <SEDSS_Server>(); server.SetPassword(password); server.StartServer(); server.OnDownloadRequest = (id) => { Debug.Log("Server responced"); return(File.ReadAllBytes(SendFilePath)); }; server.OnDataUploaded = (data, id) => { Debug.Log("Server received"); externalReceiver?.LoadVRMFromData(data); }; }