Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Mese · May 06, 2016 at 06:41 PM · networkingnetwork

NetworkLobbyManager Manually ServerChangeScene ignores to create server object

Hi everyone, I'm adapting the NetworkLobbyManager just to learn how to use it in the future, or to create my own. The thing is, I did override OnLobbyServerPlayersReady() in order to add a countdown when players hit ready. Now it looks like this (note that I commented the base.OnLobbyServerPlayersReady() on purpose)

 public override void OnLobbyServerPlayersReady()
     {
         

         StartGameTempo = (float)Network.time + TimetoStartGame;
         PlayerConfigPanel.TimeToStart = StartGameTempo;
         TimeTicking = true;
         
         PlayerConfigPanel.TimeTicking = TimeTicking;
         
         //base.OnLobbyServerPlayersReady();
         
     }


And I load the next Scene calling ServerChangeScene() (I didn't override this one)

Now, everything works fine, but when it loads the game scene (after lobby and countdown) NetworkLobbyManager creates the gameObjects for players, but immediately after it deletes them.

I guess I miss something overriding OnLobbyServerPlayersReady() and I would like to know what it is (Some kind of register the object spawned, or give it an attribute so the LobbyManager stops refusing him, I dont know!). Could somebody please help me?

Also, would be great if could see the NetworkLobbyManager source code to understand whats he doing under the hood, it would REALLY speed up my learning. Is it possible?

If you need to know anything else, please let me know!

Thanks, Regards

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 Alturis2 · Oct 17, 2016 at 02:52 PM 0
Share

I am having what I think is a similar problem? When I use ServerChangeScene it will bring the host player GameObject over just fine but it completely drops any currently connected clients. They appear to just lose their connection. (NOTE: I am not using any of the ready up systems, just wanting the host to bring along all clients without them providing any input)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by sglindme · Jun 28, 2016 at 09:25 PM

Did you ever figure this out? This function seems so messed up.

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 Mese · Jun 28, 2016 at 11:27 PM 0
Share

At the end I didnt override OnLobbyServerPlayersReady().I did a completely manual ready system with timers as a workaround. At the end this system called OnLobbyServerPlayersReady().

This is a médium solution.

Best solution: dont use the Network Lobby $$anonymous$$ánager at all. In fact, dont use UNET at all! $$anonymous$$ove to PUN (Photon Unity Network). If you use UNET, in the future, in the game scene you will need to do lots of workarounds to get things done because of bugs and/or missbehaviours of UNET.

Sadly UNET still undercooked. I guess sometime in the future it will be good enought to invest time on it.

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

79 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 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 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

Network Soccer Ball Position jitter, sending transform position late? 0 Answers

UNET AssetID 0000 zero 0 Answers

PLS recommend plugins for networking/sever which ONLY work for authentication + storing player info. 0 Answers

Couldn't delete cache in UnityWebRequest 0 Answers

how to spawn a player prefab on a server 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