- Home /
need help - networking demo with my character not working
I was able to get the networking demo working with Lerpz character. When i try to replace lerpz in the demo with my own character (by making my own prefab and same scripts), it doesn't work (it spawns my character but other clients cannot see it). I noticed that when I create my own prefab and added Network View, the "Observed" under Network View points to my prefab(transform) but the Third Person prefab in the demo has "Third Person Player (network)" under Observed. How can that be replicated? is there something else i'm missing? (i know this sounds very basic but please help)
Answer by Matthew A · Oct 18, 2010 at 11:27 AM
It sounds like there's a ThirdPersonPlayer script that you need to drag to the "observed" slot on the Network view, which is presumably using OnSerializeNetworkView to synchronise the character object.
Thanks! that did it. 2 network views took care of the "observed" characteristics. So i added 2 network views and dragged Both NetworkSyncAnimation and NetworkInterpolatedTransform scripts on to the Observed fields. That made it work!
Answer by Cyb3rManiak · Oct 18, 2010 at 11:33 AM
The observed variable can be changed either in the editor (by simply clicking on it and selecting from the list exactly what component you want to be observed), or alternatively with code using NetworkView.observed.
I'd suggest you check the manual again to understand exactly what's going on under the hood... A good place to start reading about the "observed" property and what exactly it does (State sync) is found here. If you still have a problem, post back...
Your answer
Follow this Question
Related Questions
Multiplayer avatar's transform settings 0 Answers
Help!! Unable to access the transform of my avatar (getting data real time TCP client/server) 0 Answers
Why avatar with NetworkIdentity will be disabled when change scene? 0 Answers
networkdiscovery find IP of one of Devices but not connect to each other 1 Answer