[Networking] Find object by NetworkViewID

Hello, I have a gameobject which has server related scripts. I also know it has a NetworkView component attached, with ID = 1;

I want players who connect to this server, to beable to find it by NetworkViewID. Is it possible?

NetworkView view = NetworkViewID.Find(1);

The line above doesn’t work. Could you advise, what might be wrong?

It is possible if the GameObject was created using Network.Instantiate(), but the NetworkViewID is more complex than just the single ID number that you see in the inspector. I believe it is actually three numbers combined, so you only have part of it. Your best bet is to use an RPC to pass the NetworkViewID from the NetworkView creator to the other clients. The clients can then use the value they receive to find the GameObject.

Alternatively, if the GameObject is Network instantiated on each client, you could have a script on the object add itself to some sort of global registry so that it can be later accessed by whatever ID system you like.

First of all, mediumal, thank you very much! I 've spent almost a week on this issue and seeing a person trying to help me is a pleasure.

Secondly, since I still cannot solve the problem, maybe some of you guys reading this can help:

I want a SERVER-client to start counting uptime, and CLIENT-client receive this number upon connection. I have a counting script, but I cannot pass the variable to the connected player. Could anyone help me: how to pass a variable from the server to a client?
(I heard RPC calls can be used, I read many related questions and watched youtube tutorials. They explain how to send a function, but surprisingly the simpliest thing, i.e. - sending a variable is not discussed! How can it be done: passing a variable from server to client?