Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Dharwin · Jul 08, 2011 at 08:18 PM · androidnetworksocket

.NET Socket Support for iOS/Android Basic

From the license comparison, .NET Socket Support is not supported by basic licensing of iOS or Android.

Can someone clarify what exactly this means? Does this simply mean that Unity does not supply a library of .NET Socket Functions, but I could create my own to interact with external services? Or does the absence of this feature mean that Unity Basic prevents me from implementing this functionality?

When I say "external services", I mean a basic example of an HTTP REST service for data input/output, or maybe a more complex entity like SmartFox Server for multiplayer capabilities.

My end-goal is to figure out whether or not I need Unity Pro to be able to interact with external services, or if this is still possible within Unity Basic (and Unity Pro only makes it "easier" to do).

Thanks for any help on clarifying this.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Dreamora · Jul 10, 2011 at 11:14 PM

The part in the license means that System.Net is basically missing when it comes to communication (widely used by 3rd party networking - multiplayer solutions, it includes the TCP and UDP Sockets required to talk to the web), which limits your communication to the web to plugin based solutions and WWW.

HTTP REST can be achieved through WWW by passing the data to the webservice in form of the WWWForm object and the webservice answer will be in www.text afterwards.

And you would not only need Unity Pro but Unity Pro + iOS Pro / Android Pro, as the desktop licenses don't apply to mobile in any other form than limit which licenses you can buy.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dharwin · Jul 11, 2011 at 01:35 AM 0
Share

Thanks for the response. It is interesting that the lack of this feature really just translates to the lack of the System.Net library. What stops someone from including the necessary dll's as a plugin, or using a 3rd party socket library?

avatar image Dreamora · Jul 11, 2011 at 09:30 PM 0
Share

Well its not technically removed I think. But its useless. Without UDP and TCP sockets and the related client classes there is no use for System.Net anymore, cause the Requests classes don't work at all (they work or worked on standalone desktop but thats the only platform they ever worked at all - WWW is unitys intend and supported way for webrequests that uses the native platform way on each platform)

Dropping it in does not change it cause your code will not compile as long as you try to access something disabled. You would have to go through plugin and use the platforms native sockets that way (there are no 3rd party socket libraries for .NET that don't rely on System.Net sockets to my knowledge)

avatar image
2

Answer by Dharwin · Aug 01, 2011 at 04:29 PM

I used a small workaround to achieve using the Android OS socket library, since .NET sockets are not supported with Unity's Android Basic license.

A tutorial on how I did this is here: http://devblog.twelve21.net/tutorials/mobile-socket-support-with-unity3d-basic-introduction/

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image techshaman · Sep 06, 2012 at 07:49 PM 1
Share

Link is broken for me is there still a tutorial on how to do this out there?

avatar image JaredThirsk · Aug 22, 2013 at 04:59 AM 0
Share

You could try the wayback machine: http://web.archive.org/web/20120723093724/http://devblog.twelve21.net/tutorials/mobile-socket-support-with-unity3d-basic-introduction/

avatar image
0

Answer by ZimM · May 07, 2014 at 11:39 PM

Some time ago, I've released a plugin called Good ol' Sockets that enables you to use sockets on iOS/Android without the need for Pro license. It is really simple to use, basically, just a namespace change is required. Also works with other networking assets such as Tasharen Network, Photon Networking Free, UniWeb, BestHTTP etc

Asset Store link

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by MechEthan · Mar 21, 2017 at 05:43 PM

As of Unity 5, System.Net.Sockets is available for use on iOS and Android. (For any license, I believe.)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android & PC socket connection 1 Answer

can I use one Game as Server and Client at the same time? 2 Answers

Question about Network.Destroy 0 Answers

Socket error in Android Build 1 Answer

Access android accelerometer via Wifi / 3g-4g 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges