I am trying to figure out what other code can be used to tell wether a second camera is mine when instantiating onto a server. Right now each player can control their own camera but now I am unsure how to set it up for multiple cameras. This code works fine for the main camera but the extra camera never gets disabled if it is not theirs on the server. One camera is the MainCamera and the other camera is just a new created camera. I figured with this code it would disable them both but it only does it for the main camera.
function Awake() {
if (!networkView.isMine){
GetComponentInChildren(Camera).enabled = false;
}
}
anyone know?
– jessee03please properly format your code, right now it looks like a rhinos excraments
– Benproductions1Thanks for your suggestion but I'm a coding rebel. To each their own. So if you're not here to help then kindly keep you're words to yourself.
– jessee03I don't care how you write your code in your own time for yourself, but when doing anything involving other people, standards are nesessary, people who don't follow them get left behind, don't get payed and loose their job. It's a hard reality, but writing code that other people can read is more useful than you think. BTW most coders have OCD when it comes to syntax, so if you want help from others you better stick to one syntax form.
– Benproductions1You're telling me something I already know. If I was working with other people I wouldn't be coding, I would be creating enviornments instead so I wouldn't worry about it. I'm not here to get lectured about proper coding format and I already know I code completely wrong but it doesn't bother me. So I would suggest staying on topic of peoples actual questions.
– jessee03