Author Topic: Unityscript with WP8 is producing errors  (Read 12666 times)

dustin1138

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #15 on: November 24, 2014, 05:17:58 AM »
I just loaded up the brand new 2.0.2 version of TNet (which lists WP8 compile error fixes). But I'm still getting missing content errors (Unity version 4.5.2). Is there something I'm missing? This isn't a UnityScript/plugins folder issue like I mentioned before since I get the error even with just the plugin in an empty project. Here's the error:

Error building Player: Exception: Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void TNet.TcpProtocol::set_noDelay(System.Boolean).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #16 on: November 25, 2014, 01:58:00 AM »
You can pretty much comment out that function's contents or wrap it in a #define to get around it. What else is giving you trouble? I Can wrap it in #defines on my end but need to know what they are. I can't compile / test WP8.

dustin1138

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #17 on: November 25, 2014, 05:43:38 AM »
Hey Aren. Do you not have a WP8 test unit? It seems like Microsoft would be happy to hook you up with one.

Here's the error list I came up with so far. I wrapped each with "#if !UNITY_WP8" checks in order to proceed. I stopped on the last one since it seems to encompass "static public string GetResponse (WebRequest request)" which I couldn't figure out how to wrap without breaking calls to it from other scripts.

TNTcpProtocol:
Exception: Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework.
Exception: Error: type `System.Net.Sockets.SocketFlags` doesn't exist in target framework.
Exception: Error: method `System.IAsyncResult System.Net.Sockets.Socket::BeginConnect(System.Net.EndPoint,System.AsyncCallback,System.Object)`
Exception: Error: method `System.Boolean System.Threading.WaitHandle::WaitOne(System.Int32,System.Boolean)
Exception: Error: method `System.Void System.Net.Sockets.Socket::EndConnect(System.IAsyncResult)`
Exception: Error: type `System.Net.Sockets.SocketFlags` doesn't exist in target framework
Exception: Error: method `System.Int32 System.Net.Sockets.Socket::EndSend(System.IAsyncResult)`
Exception: Error: method `System.Int32 System.Net.Sockets.Socket::EndReceive(System.IAsyncResult)`
Exception: Error: type `System.Net.Sockets.SocketFlags` doesn't exist in target framework.

TNTools:
Exception: Error: type `System.Net.NetworkInformation.NetworkInterface` doesn't exist in target framework.
Exception: Error: type `System.Net.Dns` doesn't exist in target framework.
Exception: Error: method `System.String System.Net.WebClient::DownloadString(System.String)` doesn't exist in target framework.
Exception: Error: method `System.Net.WebResponse System.Net.WebRequest::GetResponse()` doesn't exist in target framework.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #18 on: November 26, 2014, 09:17:54 PM »
Might be easier if you just sent me the updated file(s) so I can have a look. In regards to GetResponse: what's the issue with it? All it does is checks a web request for a response.

And nope, I don't have a WP8 unit.

dustin1138

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #19 on: November 27, 2014, 01:04:11 AM »
Hey Aren,

I PM'd you.

Thanks,
Dustin

smuttlegiaco

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #20 on: February 12, 2015, 04:08:36 AM »
while searching for a solution to our current problem, I stumbled over this thread. dustins problems are our problems at the moment, so I wanted to ask if there is any workaround available? thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #21 on: February 13, 2015, 09:16:51 AM »
In short, WP8/WSA doesn't support .NET sockets the same way every other platform does. The only work-around that was established in this thread was to basically disable TNet's code on those platforms, making it possible to compile but also completely disabling networking.

smuttlegiaco

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Unityscript with WP8 is producing errors
« Reply #22 on: February 13, 2015, 09:48:38 AM »
sucks!

thanks for the answer nontheless.