- Home /
Question by
vivekcoolz · Aug 26, 2016 at 04:45 AM ·
unity 5photonmultiplayer-networking
I am trying to hide my player from others using Photon Unity.
[PunRPC]
private void SetRenderer(bool weild)
{
if (!photonView.isMine)
{
if (!weild) {
SkinnedMeshRenderer[] smRs = gameObject.GetComponentsInChildren<SkinnedMeshRenderer> ();
foreach (SkinnedMeshRenderer smR in smRs)
smR.enabled = false;
}
else
{
SkinnedMeshRenderer[] smRs = gameObject.GetComponentsInChildren<SkinnedMeshRenderer> ();
foreach (SkinnedMeshRenderer smR in smRs)
smR.enabled = true;
}
}
}
Comment
What are you having trouble with specifically? Your question isn't a question.
Your answer
![](https://koobas.hobune.stream/wayback/20220612091527im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Light.color Sync ? 1 Answer
Photon RPC is not working in photon? 2 Answers
Android mobile local multiplayer game via Wifi 4 Answers
Photon network won't join random room with a custom property 0 Answers