- Home /
In photon, how to enable Unity's Ui only for the player how triggered it
Hello.
I am having quite a hard time trying to find a solution to my problem. I am trying to activate a panel with Unity's new UI, but this panel to be active only on the screen of the player who triggered it and not to the others. I am trying to use photonView.isMine but it is not behaving as it should. the problem for this is that if I trigger the panel on a view that is not mine, it shows the panel only on my view, so this is not what I need. I need the panel to be shown only on the screen of the player who triggered it. Your help would be much appreciated. Thanks!
Answer by fillefilip8 · May 20, 2016 at 11:49 AM
Just enable and disable the canvas for the client. like ui.SetActive(true); And have the ui in the scene without a photonview and that.
Hope this solved your problem.
I think I tried what you are saying, but it does not work. What do you mean by enable for the client?
Thanks
public void showLobbyUI(){
lobbyUI.SetActive(true);
}
That is a example
I tried this at first, with no PhotonView Component on the Canvas. I is not behaving as expected. It is still activating the Canvas. I also tried this on a simple Cube. Still activating for all players views, even if there is no photonView component.
Your answer
![](https://koobas.hobune.stream/wayback/20220612081157im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Photon Server Issue 0 Answers
player facing lag issue or it is a sync problem ? 0 Answers
InvalidCastException: Specified cast is not valid 2 Answers
I am trying to hide my player from others using Photon Unity. 0 Answers
Unity Photon Engine JoinOrCreateGame 2 Answers