private void SessionChanged(object sender, SessionChangedEventArgs e) { Debug.Log ("Session Changed " + e.state); if (e.state == U3DXT.iOS.Native.MultipeerConnectivity.MCSessionState.Connected ) { Debug.Log("CONNECTED"); string path = Application.temporaryCachePath+"/someFile.bin"; // create some arbitary binary data. or load from existing location FileStream someFile = new FileStream(path, FileMode.Create); someFile.WriteByte(0x42); someFile.Close(); path = "https://www.google.com/images/srpr/logo4w.png"; _session = e.session; _session.SendResourceAtURL(new U3DXT.iOS.Native.Foundation.NSURL(path), "someFile.bin", e.peerID, sendResourceCompleted); } }
private void SessionChanged(object sender, SessionChangedEventArgs e) { Log("Session Changed " + e.state); if (e.state == U3DXT.iOS.Native.MultipeerConnectivity.MCSessionState.Connected) { Log("CONNECTED"); string path = Application.temporaryCachePath + "/u3dxt.jpg"; // create some arbitary binary data. or load from existing location FileStream someFile = new FileStream(path, FileMode.Create); someFile.WriteByte(0x42); someFile.Close(); path = "http://u3dxt.com/wp-content/uploads/2013/06/gears_14662320_s-225x225.jpg"; _session = e.session; _peerId = e.peerID; _session.SendResourceAtURL(new U3DXT.iOS.Native.Foundation.NSURL(path), "u3dxt.jpg", e.peerID, sendResourceCompleted); } }
private void SessionChanged(object sender, SessionChangedEventArgs e) { Log("Session Changed " + e.state); if (e.state == U3DXT.iOS.Native.MultipeerConnectivity.MCSessionState.Connected ) { Log("CONNECTED"); string path = Application.temporaryCachePath+"/u3dxt.jpg"; // create some arbitary binary data. or load from existing location FileStream someFile = new FileStream(path, FileMode.Create); someFile.WriteByte(0x42); someFile.Close(); path = "http://u3dxt.com/wp-content/uploads/2013/06/gears_14662320_s-225x225.jpg"; _session = e.session; _peerId = e.peerID; _session.SendResourceAtURL(new U3DXT.iOS.Native.Foundation.NSURL(path), "u3dxt.jpg", e.peerID, sendResourceCompleted); } }