- Home /
Networking with Windows Phone 8
We have just upgraded to Unity 4.2 and tried to build one of our projects for Windows Phone 8. However, we get a compilation error saying that TcpClient is not supported in this framework.
We have checked that TcpClient IS supported in .Net 4.5, but it is not supported in Metro apps.
So my question is: Are we doing something wrong? Maybe we haven't properly configured the Windows phone 8 SDK? Or maybe Unity is not properly supporting it yet?
Thanks in advance for your help.
Is there anyone with the same problem? Please, let us know even if you don't know the answer.
There is a way if you know how to use this header
#if NETFX_CORE
using Windows.Networking.Proximity;
using Windows.Networking.Sockets;
using Windows.System.UserProfile;
#endif
Answer by JamesK · Aug 08, 2013 at 06:34 AM
"Things that are not yet supported: Network classes, WWW is supported though"
We are only using WWW. However we are using it with POST data and Headers. $$anonymous$$aybe is it that, which is not supported?
Answer by yoonitee · Jan 27, 2014 at 03:16 PM
I would also like Networking for Windows Store please Unity!!! :) :)
Answer by Anum Shahid · Apr 14, 2014 at 10:23 AM
Error building Player: Exception: Failed to run reference rewriter with command "--target="Temp/StagingArea\Assembly-CSharp-firstpass.dll" --framework="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0,C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Libraries" --platform="C:\Program Files (x86)\Windows Phone Kits\8.0\Windows MetaData\Windows.winmd" --support="Temp/StagingArea/WinRTLegacy.dll" --winmdrefs="" --system=System --dbg=pdb --alt=System.Net;System.Net.Sockets,System.Net;System.Xml.Serialization;System.ComponentModel,System.Windows;System.Threading,mscorlib". [Temp/StagingArea\Assembly-CSharp-firstpass.dll] Error: method System.Collections.Generic.List
1 System.Collections.Generic.List`1::ConvertAll(System.Converter`2)` doesn't exist in target framework. It is referenced from Assembly-CSharp-firstpass.dll at UnityEngine.Transform[] SplineController::GetTransforms(). Catastrophic failure while running rrw: System.NullReferenceException: Object reference not set to an instance of an object. at Unity.ReferenceRewriter.RewriteMethodSpecMemberRefs.Visit(MethodDefinition method) at Unity.ReferenceRewriter.MethodDefinitionDispatcher.Dispatch(TypeDefinition type) at Unity.ReferenceRewriter.MethodDefinitionDispatcher.Dispatch() at Unity.ReferenceRewriter.RewriteOperation.Execute(RewriteContext context) IS THIS IS A SAME kind of error, not supported in unity?
Answer by farrisarts · Dec 23, 2014 at 02:00 AM
Since we have been forgotten I am working on a networking library that works cross platform, mainly with the drive to making it work on Windows 8.1 and Windows Phone 8.1
http://forum.unity3d.com/threads/wr...rary-including-windows-universal-apps.286900/
Answer by tobiass · Feb 13, 2015 at 01:33 PM
I don't know if I should say that here but Windows 8 Store and Phone is a bit messy. The APIs for TCP in those two platforms are very different between each other and different from what Unity offers.
We ended up implementing our own socket class for PUN. This is then implemented in three ways: Unity, Windows Phone and Windows Store. Each variant is included in a assembly file (dll) and put into Unity's special Plugins (sub)folders. The trick is: We use one class only and when Unity generates the Phone or Store projects, it replaces the dll it uses with the one specific for the platform. It looks the same but works different inside.
A new networking solution from Unity is coming which will support all platforms. If you don't need the authoritative in-Unity hosting, you can also try PUN Free which is similar to the older Unity Networking and cross platform.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Does Unity 5 support Windows Phone Networking? 1 Answer
Client side Player prefab spawned by overriding GameManager return false for isLocalPlayer 0 Answers
Problem with Application.Quit and Async networking 0 Answers
How to watch in client applications what it is happening in the server one? 0 Answers