Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by rob5300 · Jan 10, 2015 at 04:42 PM · networkingnetworknat

Using UPnP with Unity Networking?

Hello, i am wondering if it is possible to use UPnP to directly open ports to allow clients to communicate to a server. I am not sure how the NAT punch through works, but if it is similar i wouldn't mind a description of how it works!

I found this article that demonstrates upnp in .net using a windows library: http://pietschsoft.com/post/2009/02/05/NET-Framework-Communicate-through-NAT-Router-via-UPnP

UPDATE: I found this library, and this could possibly be used to do this, as it works with .net and mono. https://github.com/lontivero/Open.Nat

Thankyou.

Comment
Add comment · Show 3
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 jpthek9 · Jan 10, 2015 at 04:51 PM 0
Share

If you don't need an authoritative server, you could use Photon Unity Networking which would get rid of the need to use NAT punching.

avatar image rob5300 · Jan 10, 2015 at 05:00 PM 0
Share

Yeah Photon is not something i can use, which is why i am looking into better ways to allow connections to server hosts.

avatar image RealSoftGames · Oct 04, 2016 at 02:30 PM 0
Share

hi, were you able to get the library working with unity, i have an issue where it only works in the editor and not in a build. it crashes when i open the build of a game.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by jpthek9 · Jan 10, 2015 at 05:15 PM

I suggest you use Photon Unity Networking which is an excellent SDK that gets rid of a lot of the needless technical aspects of networking. Also, it has Reliable UDP which is a very useful protocol to ensure proper packet sending. Check it out here: https://www.exitgames.com/PUN. You just install the plugin and follow this guide: http://doc.exitgames.com/en/pun/current/tutorials/tutorial-marco-polo to get you started.

It's really quite similar to Unity networking and many of the methods share the same name.

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 rob5300 · Jan 10, 2015 at 05:22 PM 0
Share

From what i know, PUN does not allow you to host a local server yourself, which is what i wish for any client to be able to do. I'm not even sure if it allow multiple private servers to be hosted via their online service.

avatar image jpthek9 · Jan 10, 2015 at 05:28 PM 0
Share

No it doesn't. If that is something you need, that it unfortunately not an option. You can, however, simulate a local server with a player but this leads to vulnerability for hacking.

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

27 People are following this question.

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

Related Questions

NAT Punchthrough failed 0 Answers

Connect to remote private IP 1 Answer

UNET Direct IP Connection not working 0 Answers

Networking Example Doesnt Connect 0 Answers

Since switching to using offline & online scenes in the NetworkManager, Clients will not sync (UNET) 0 Answers


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