The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How to make an object visible only to one player not the other one

2021-10-28 11:14:59

How to make an object visible only to one player not the other one. photonView.IsMine is not working


[Deleted User]
2021-10-28 11:18:05

Hey, not really sure what you mean. You can turn the renderer off from an RPC if you want to make it invisible to someone. You can do it from the SerializedRead stream too. There are lots of ways to achieve what I think you're trying to say.

2021-10-28 12:02:15

@MeepPun See i want only want to show a UI panel player who got triggered with another object and not to the other players. Pls help

2021-10-28 12:03:14

I tried using if(photonView.IsMine) but for some reason it doesn't work

2021-10-28 12:13:04

The Code Is Here:

using UnityEngine;using TMPro;using Photon.Pun;using Photon.Realtime;p - is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

At line 226 at "OnTriggerEnter" function, the if(view.IsMine) statement at line 234.

2021-10-28 12:19:23

I only want the player who got collided with another gameobject called shell which has a tag called "Shell". After it collided with the player, i only want to show him a UI Panel not to the other Players. Pls help

2021-11-11 20:53:24

You can try changing the location of your trigger method. Move it from the player to the Shell object.

So you will have the next code in the Shell object:

2021-11-16 08:03:16

@Murky thanks, i realized we can also do an RPC

2021-11-16 08:03:30

your one also works!

Back to top