Unity3D Multiplayer Example question

I download the example multiplayer project and it is pretty cool… it works…:slight_smile:

So for a learning exercise, I attempted to replace the little Lerpz dude with one of my characters. This generally went OK… I carefully assigned the same scripts to my model except for one thing I could not figure out:

I could not change the “Observed” setting in the “Network View” window to match that of the Lerpz character. I have been trying to figure out how the Lerpz guy is different from my character. I suppose it is written to the “Network View” via some other script but I can’t find the connection.

So right now, leaving the “Network View” to the ‘transform’ of my character results in the 2nd model sort of popping in and out of the multiplayer view (unlike that of Lerpz where there are always good views of both characters).

Thanks for any insight or experience with this Unity example code.

http://unity3d.com/support/resources/example-projects/networking-example

if you look at the observed with the Lerpz, what does it say ? It can be a script or a transform.

Even if you simply open the example multiplayer project, change the ‘observed’ in the Network View on the Lerpz character (by dragging the character onto the field)… you cannot change it back to the original condition that was set in the example.

if i remember right there is a pdf joined with the project and all should be in there.

There is no documentation with the example file.

I think this would be a great answer for everyone wanting to use the Unity Multiplayer Example:

“If you change the ‘observed’ setting on Lerpz in the Network View - how do you change it back (from transform)?”

there is a tutorial here : http://unity3d.com/support/resources/tutorials/3d-platform-game
did you read it ? i’m sure it says how to place and assign the lerpz

I like that tutorial… and it does have nice downloadable documentation… But that tutorial does not set-up Multiplayer.

Has anyone been able to change the ‘obseved’ settings in the Network View while studying the Unity Multiplayer Example?

… throw a starving artist a bone :slight_smile:

http://unity3d.com/support/resources...orking-example

The example script is not tracking the transform of the prefab in the network view script - it’s tracking the “Network Interpolated Transform” script. Drag your character prefab into the scene and then drag the title of this script in the Inspector window into the “Observed” field of the network view.

What this does is, instead of synching the transform of the prefab automatically, it instead tells Unity to use the “OnSerializeNetworkView” function to handle synching, and this chunk of code deals with interpolation.

Check out Unity - Scripting API: MonoBehaviour.OnSerializeNetworkView(BitStream,NetworkMessageInfo) for a summary.

edit: after doing this, you’ll need to update the prefab by dragging it back from the scene into your assets. No idea if you would’ve figured this out or already know it, but thought I should mention it!