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 /
This question was closed May 25, 2013 at 02:28 AM by Jazzer008 for the following reason:

Other

avatar image
1
Question by Jazzer008 · May 25, 2013 at 12:58 AM · multiplayerservermasterping

Can only ping the MasterServer after pinging it externally using command prompt, at the same time.

Been trying to get master server code working for some time now. Thought a straight up copy from the example would get things running. The example was working fine, but after changing the game name and some other minor parameters it no longer functions correctly.

It won't even return a ping from the master server ip. We tried pinging the ip from command prompt and it was successful. Then I tried pinging the server from prompt, and quickly tried from within the game again, this caused the game to start pinging the master server successfully!

I have no clue what's going on. :(

Has anyone had any good luck with setting up some master server networking?

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

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by clunk47 · May 25, 2013 at 02:08 AM

I use Photon for networking, so I'm not too familiar w/ Unity's built in. But you say you can get it to work by pinging from command prompt first? Sounds like a firewall or router issue, but you could always use System.Diagnostics as a workaround and have Unity open command prompt w/ ping arguments, then place the code to actually connect to the masterserver after pinging w/ cmd. This would pretty much do what you're already doing, but it would happen automatically. Hope this helps at least until you can connect without pinging first :) Here is a simple example of how to do this in C#

 using UnityEngine;
 using System.Collections;
 using System.Diagnostics;
 
 public class PingTest : MonoBehaviour 
 {
     string fileName = "cmd.exe";
     string arguments = "/c ping localhost"; //replace localhost with masterserver ip.
     ProcessStartInfo cmdping;
     
     void Awake()
     {
         cmdping = new ProcessStartInfo(fileName, arguments); 
         Process.Start(cmdping);
         //Put your code for connecting from within unity here, after the cmd opens and pings. 
     }
 }
 

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

Follow this Question

Answers Answers and Comments

14 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

Related Questions

Unity networking tutorial? 6 Answers

Custom master server in the Startrooper multiplayer project? 0 Answers

Receiving NAT punchthrough attempt from target 2500 failed 1 Answer

What is master server in unity is it okay to use it in my multiplayer?? 1 Answer

Most efficient way to structure a huge online "virtual world" 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