- Home /
Question by
SilentParrotStudio · Nov 19, 2015 at 01:29 PM ·
networkingnetworkviewnetworkplayernetwork viewnetworkviewid
Hello, I created a script to add the NetworkView of the player to "public NetworkView nV", but it's working only if the client is the host.
Hello, I created a script to add the player's NetworkView to "public NetworkView nV", but it's working only if the client is the host. If I press the button with a player which is not the host, it don't add the client's NetworkView. Here is the script:
void OnTriggerStay(Collider col)
{
if (nV == null)
{
if (col.tag == "Player")
{
if (Input.GetKeyDown(KeyCode.E))
{
nV = col.GetComponent<NetworkView>();
}
}
}
}
Comment
Your answer
Follow this Question
Related Questions
SetLevelPrefix not working as intended? 0 Answers
How to sync networkViewIDs 0 Answers
Network views wrong on re join to server 0 Answers
Get NetworkPlayer from ViewID 1 Answer