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 paulonl · Oct 18, 2014 at 04:28 PM · gameserveronline

How to make an online server.

I am making a fishing game where you can battle against each other online. but I dont know how to join a server and how to make a server please help.

this is my code till now:

pragma strict

 MasterServer.ipAddress = "127.0.0.1";
 
 var remoteIPadress = "192.168.0.13";
 var remotePort = "";
 var listenPort = "";
 
 var useNat = true;

 var myIP = "";
 var myPort = "";
 
 var MaxPlayers = 10;
 
 
 
 function Start () {
 
   //PlayerScript = GameObject.Find("spritenaorobot(Clone)").GetComponent(OnTriggerEnter);
 
 }
 function OnConnectedToServer()
     {
     
     Debug.Log("Server connect");
      GameObject.Find("Cube").transform.position.x = -5;   
     }
 
 function OnServerInitialized()
     {
         Debug.Log("Server Initializied");
         GameObject.Find("Cube").transform.position.x = 0;
     }
     
     
     function RefreshHostList()
     {                        //typename
     MasterServer.RequestHostList("Uniquegamename");
     
     }
     
 function OnGUI ()
 {//sort of Starting server
 
 if(Network.peerType == NetworkPeerType.Disconnected){}
 
 if(GUI.Button(Rect(5,5,80,30),"Connect")){
 
 Network.useNat = useNat;
 Network.Connect(remoteIPadress, remotePort);
 
 }
 if(GUI.Button(Rect(5,40,80,30),"Startserver")){
 
 
 Network.useNat = useNat;
 Network.InitializeServer(MaxPlayers, 25000);
 
 }
 
 remoteIPadress = GUI.TextField(Rect(5,100,120,30),remoteIPadress);
 
 
 }

i am 14 years old so it could be a dumb question.

greetings Paul PS:I am dutch so i could have made some mistakes in spelling.

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

· Add your reply
  • Sort: 
avatar image
0

Answer by Florensie · Oct 19, 2014 at 08:56 AM

Maybe this could help: http://www.paladinstudios.com/2013/07/10/how-to-create-an-online-multiplayer-game-with-unity/

Btw, I'm also dutch (Belgian) and 14 years old. :)

hoi

Comment
Add comment · Show 1 · 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 paulonl · Oct 19, 2014 at 03:28 PM 0
Share

oke fijn dat ik ook iemand van mijn taal er bij heb ik zal kijken of de link iets is voor mij alvast bedankt voor de reactie.

english Okay nice I also have someone of my language when I will see if the link is something for me thanks for the comment

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to make server files 1 Answer

Network Games - Master Server 1 Answer

smartfoxserver keeps me logged in after exiting game 1 Answer

Detect active servers and join UNet 0 Answers

Making own server instead of using unity matchmaking and relay servers? 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