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 Morgenstern_1 · Jun 23, 2016 at 09:01 AM · networkingnetworktimingtiming-issue

When Do SyncLists get Initialized?

Hey,

I'm having issues that are only occurring when changing map (e.g. going from one online scene to a different one, retaining all current players). The first time into an online scene everything runs fine. However each time I change online scenes after that about 50% of the time I hit issues where one of my SyncLists (just a SyncListInt) is not initialized when OnServerAddPlayer is called.

I need this to be initialized before I can start adding players. As far as I can tell from the documentation there is no way to check whether or not a SyncList has been initialized, is this correct? If that is the case, can anyone suggest a solution or workaround that might help?

I'm having major issues with UNET call-timings - it seems that they vary wildly between Editor/Standalone and also even during different runs of a standalone build.

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 Morgenstern_1 · Jun 23, 2016 at 10:33 AM 0
Share

For clarity, what's happening in a 3 player game (1 host, 2 clients) is outlined below.

When the host first starts a game:

  1. RequiredNetworked$$anonymous$$anagerObject runs OnStartServer

  2. UNET$$anonymous$$anager runs OnServerAddPlayer for the host.

  3. Client 1 chooses to connect.

  4. UNET$$anonymous$$anager runs OnServerAddPlayer for client 1.

  5. Client 2 chooses to connect.

  6. UNET$$anonymous$$anager runs OnServerAddPlayer for client 2.

When the map changes, however, the following call order happens around 50% of the time:

  1. UNET$$anonymous$$anager runs OnServerAddPlayer for client 2.

  2. SyncList not Initialized errors occur.

  3. UNET$$anonymous$$anager runs OnServerAddPlayer for client 1.

  4. SyncList not Initialized errors occur.

  5. RequiredNetworked$$anonymous$$anagerObject runs OnStartServer.

  6. UNET$$anonymous$$anager runs OnServerAddPlayer for the host.

  7. Host is the only player who successfully manages to connect.

Is there any way to ensure OnStartServer runs BEFORE any players are added?

0 Replies

· Add your reply
  • Sort: 

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

82 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 avatar image avatar image avatar image

Related Questions

How to move an object over the network. If only the client controlls/moves that non-player object? 1 Answer

Unity Networking 1 Answer

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


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