- Home /
Give a NetworkView a predetermined ID
Hello! I am working on a multiplayer game...
Due to the situation I am in (which is very hard to explain) I am forced to implement my networking in a strange way. My goal is to do this:
Create a simple C# script which, in its Start() function adds a NetworkView component and then sets the ID of that NetworkView to a predetermined number.
The problem is... I have no idea how to do this! I know how to use AllocateViewID() but there is no way for me to guarantee that it generates the same number for each script that uses it every time. Is there a way to allocate a view ID by a number? And is there a way to check if a view ID already exists?
Thanks in advance!
Flynn
yes, manually. You have to do everything by yourself, nothing automatic exists... sorry
Your answer
![](https://koobas.hobune.stream/wayback/20220613090148im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Array of NetworkViewID passing in a RPC 1 Answer
Sending info to/from different networkViews 1 Answer
Adding id variable # to instantiate-ed object 2 Answers
Unique Highscore identifier 1 Answer