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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by W.Walter · Jan 05, 2015 at 05:37 AM · serverclientsync

Network sync complicated server-client relationship

Hey everyone

Here is my setup: My clients connect to the server. The server must accept many clients, and does not simulate the world at all. It simply syncs the states across the clients.

When the clients connect they create a synced networkView on itself and the server through RPC calls. Each client does this. The client is the owner of the network view and is broadcasting its state to the server. The server needs to then broadcast this state to the other clients.

The real question is can a networkView (on the client) broadcast to multiple networkViews? Eg, broadcast to all the clients and the server at the same time?

The alternative that I can think of (and have started implementing) is having the server create seperate paired networkViews for all the clients to syncronize the state on the clients, and then the server links (with a script) the data between the paired network views.

Also of note is that the server inst running any world simulations. It is a seperate unity project and it is just exchanging raw data between the clients which do their own simulations.

Best regards... I hope it makes sense :/

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 weenchehawk · Jan 05, 2015 at 10:42 PM 0
Share

You want to boradcast to every networkView on every connected machine ? I assume simply sending an RPC to a single networkView on every connected machine isn't enough (sending an RPC with RPC$$anonymous$$ode = All) ?

If you absolutely need to hit every networkView I'd use a gameobject as a router and have it send (& by implication receive) asll the RPC's then have it distribute the RPC's data to all the game objects in the game (expect a performance hit though depending on hoe often you want to do this).

1 Reply

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

Answer by W.Walter · Jan 05, 2015 at 10:45 PM

I got it sorted. Unity is awesome :D

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 weenchehawk · Jan 05, 2015 at 10:49 PM 0
Share

Like to share your solution (for future travellers here) ?

avatar image W.Walter · Jan 05, 2015 at 10:50 PM 0
Share

I'm actually using two different u city projects, one as server and one as the clients. It works fine except I have to make sure my paired network views get assigned the same view ID by the unity editor otherwise they won't be paired. The server has totally different scripts than the client. Although to send an RPC requires that the sending script contains the RPC, which I have to fix by having a dummy RPC stub to make the RPC send to the server. (The cluents only send RPC to the server,and the server to all the clients)

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

25 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

Related Questions

How do I use uNET to send client data to server (SyncListBool goes the wrong way)? 1 Answer

Server + Client NPC Syncing issue 1 Answer

Multiplayer syncronisation 1 Answer

RPC to a single client 1 Answer

Download pictures and store them temporarily 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