State synchronization with local instantiation...?

So I’m trying to use this method of object instantiation, verses Network.Instantiate():

var cubePrefab : Transform;
function OnGUI ()
{
if (GUILayout.Button("SpawnBox"))
{
var viewID = Network.AllocateViewID();
networkView.RPC("SpawnBox",
RPCMode.AllBuffered,
viewID,
transform.position);
}
}

@RPC
function SpawnBox (viewID : NetworkViewID, location : Vector3) {
// Instantate the prefab locally
var clone : Transform;
clone = Instantiate(cubePrefab, location, Quaternion.identity);
var nView : NetworkView;
nView = clone.GetComponent(NetworkView);
nView.viewID = viewID;
}

This, of course, taken from the manual entry on Network.AllocateViewID(). The problem that I’m having is when I spawn the same prefab on both client(s) and server, the clients cannot control their copies over the network locally, only the server has that level of control. In other words, if I move the entity on a client, I would expect that movement to propagate everywhere else, but that behavior only occurs when I move it on the server. I suspect it’s because technically the server “owns” it’s copy (networkView.owner), and I can’t change that because it’s read only. Is there a way to allow the client to control the object, as if I used Network.Instantiate()? Or did I do something wrong / neglect a step?

Why not just use Network.Instantiate() ? It works.

I haven’t explored the use of groups yet, but who’s to say I want to instantiate an avatar on every connected client? And furthermore, Network.Instantiate() is buffered, which lends itself to undesirable behavior when new clients connect. I’d rather send each client a current list of connected players and have them handle the instantiation themselves, if I can.

PROBLEM SOLVED!

I didn’t realize that the client could allocate view ids, which solves the ownership problem. Thusly yes, you can instantiate objects locally and still use state synchronization automagic. Awesome.

ED: What I was doing before was allocating view ids on the server and sending them to the client. Now I can just allocate them on the client.

Bah, another snafu. (This post-chain btw is really for informational use.) I’m walking this road of local instantiation to avoid the issues related to buffered instantiate calls. Well guess what! When you use the state synchronization, upon connection, the client(s) will receive updates from other objects already on the server immediately, and if they get there before you can create the local copy, your local copy will be silent. Forever. The solution being… use a buffered RPC call to instantiate your objects! Bah! That’s what I’m trying to avoid!

So the two options, it seems, are use Network.Instantiate() to spawn objects, and pussyfoot with the groups and whatnot to fix issues with spawning destroyed things, not to mention one server tracking multiple worlds; or use RPCs to communicate transforms, which is more work than it’s worth, really.