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 shutongy · Oct 18, 2013 at 01:06 AM · networking

Unity HostData connectedPlayers always return 1

Hi guys, I started a simple multiplayer game as a part-time interest, now I got all the connection stuff work except for an annoying bug, which is the HostData .connectedPlayers always return 1 even there are already 4 or 5 player connected to the host I don't know how to format my code, so I will post a screenshot of the code alt text

So what I do here is first have a text field where you can filter the host by their name. And then for all the host that match the search, display their name, how many players are connected, and that's where the bug appears, like I said, it always return 1. I've searched the internet, and it seems there is nobody having complained the same problem. Maybe I just the unlucky one or is there anything I did wrong so that it cannot return the correct result?

Thank you very much.

screen shot 2013-10-17 at 8.52.36 pm.png (156.1 kB)
Comment
Add comment · Show 1
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 shutongy · Oct 21, 2013 at 07:10 PM 0
Share

anyone can help?

1 Reply

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

Answer by shutongy · Oct 21, 2013 at 03:55 PM

I swear that the hostdata class couldn't show connected players correctly last week when I tested. But today it works. I guess the network was crazy or I was just crazy. I will mark it as solved.

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 CodyWard · Feb 27, 2014 at 12:41 AM 0
Share

I am having this same error. It is driving me crazy.

avatar image rileydabozo · Apr 25, 2014 at 03:32 AM 0
Share

Same with me. I'm trying to make it so that if there is more than 1 person connected it won't show the server, so that each server only has one player.

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

16 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to call a MainClass Funktion ? 1 Answer

Can you create a Stand alone server for your game? 0 Answers

masterserver connection 0 Answers

Unity game on iPad sending and email with strings 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