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 Kayden007 · Oct 06, 2012 at 06:34 PM · multiplayerphotonservermmo

Unity Photon Login help

So I was following tutorials from "http://www.youtube.com/user/cjrgaming" when I got stuck at his "Intro To Photon 3.0 - Creating our client" video http://www.youtube.com/watch?v=RRdjwKWprzE where whenever I click the "Connect" button in the "Login" Scene the status just stays at disconnected. I've looked over the video and started over from scratch more than 6six during the last 5days but still doesn't seem to work. I think the problem might be this line in the code I'll provide. Due to it having a green wavy line under it in Visual Studo

[code]PhotonPeer peer = new PhotonPeer(_photonServer, false);[/code]

Whole code

[code]using UnityEngine; using System.Collections; using System; using ExitGames.Client.Photon;

public class Login : MonoBehaviour { private PhotonServer _photonServer; private bool connected = false; // Use this for initialization void Start() { Application.runInBackground = true; _photonServer = new PhotonServer(); }

 // Update is called once per frame
 void Update()
 {
     try
     {
         if (connected)
         {
             _photonServer.Update();
         }
     }
     catch (Exception e)
     {
         Debug.Log(e);
     }
 }

 public void OnApplicationQuit()
 {
     try
     {
         _photonServer.Disconnect();
     }
     catch (Exception e)
     {
         Debug.Log(e);
     }
 }


 public void OnGUI()
 {
     if (GUI.Button(new Rect(100, 60, 100, 30), "Connect"))
     {
         PhotonPeer peer = new PhotonPeer(_photonServer, false);

         _photonServer.Initialize(peer, "local host:5055", "PhotonIntro");
         connected = true;
     }

     GUI.Label(new Rect(100, 100, 200, 300), _photonServer.Status);
 }

} [/code]

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 tobiass · Oct 11, 2012 at 08:20 AM

Your server address is wrong. "local host:5055" must be "localhost:5055". An error like this should log out some hint what went wrong to the console. If it doesn't, check your IPhotonPeerListener.DebugReturn() implementation. It should log.

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

10 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

Related Questions

Unity networking tutorial? 6 Answers

Which server solution should I choose to develop an EVE Online alike game, but with a much smaller scale (2-4 players in a room, server/client architecture for anti hack)? 1 Answer

MMO Server backend: Smartfox or Photon 2 Answers

multiplayer customer client server code. lag issues with very straight forward code?? 0 Answers

indie db hosting woes 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