I apologize if the subject line isn't exactly what I'm trying to learn.
Basically, I'm trying to create a server-controlled "tick" at a specific time interval. And only if certain conditions are met based from the server's perspective, something will either happen or not, and will be displayed/changed on the clients.
There is a trigger with an associated mesh. If a player (collider) is inside that trigger when the server's "tick" takes place, the associated mesh will turn a specific color (dependent on the player). Also, that player will gain a point.
I can get this working in a non-network environment. But when I try to add UNET, things don't sync well. Each "tick" seems to be client-based. And each client also manages its own scoring and color changes.
How can I make only the server to control when a true "tick" takes place, and also the color changes and point scoring?
I'm attempting to use a "game manager" object, but each client seems to have their own copy, making the "ticks" happen locally, throwing the color and point changes out of sync.
Thank you! I'm very new to UNET/networking, so any help or even directions to tutorials that deal with network time/score keeping would be appreciated :-)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
118 People are following this question.
Unity networking tutorial?
UNET OnCollisionEnter issues
Photon timer issue
best way to make a multiplayer physics heavy game (3000+ rigidbodys)
MMO server side programming