I have a multiplayer test project that works with multiple players controlling their own objects that were created with Network.Instantiate(…).
QUESTION 1: Referring to the code below from my player script, why can’t I change the color of the player in OnNetworkInstantiate() but I can in MouseDown()? (Note: The network objects start off yellow.)
QUESTION 2: What do I, OR DON’T I, have access to in OnNetworkInstantiate()?
Thanks for any help.
– Paul
void OnNetworkInstantiate(NetworkMessageInfo info) {
// THIS DOES NOTHING!
renderer.material.color = Color.magenta;
}
void OnMouseDown() {
if (!networkView.isMine) return;
renderer.material.color = Color.white;
}