photonView.IsMine doesn't work for me but !photonView.IsMine does

Whenever I check photonView.IsMine it still effects both my characters but whenever I check !photonView.IsMine it only effects the character that isn't mine. Both character's Photon View components have different values including isMine. I'm not completely sure but I think it was working before the Version 2.41 - August 02, 2022 update if that helps.

Best Answer

  • robbie
    robbie
    Answer ✓

    Never mind, Photon was working fine all along. My build was just taking input from the controller while in the background. The Input System Package Background Behavior was set to "Reset and Disable Non Background Devices" I changed it to "Reset And Disable All Devices" now it works.

Answers

  • Tobias
    Tobias admin
    edited April 2023

    I think if this was a new issue in 2.41, we would have noticed since release.

    There is something odd going on in your case. Maybe check if the reference for photonView is pointing to the wrong PV?

    It could also be that the client are no longer in the same room (maybe one dropped).

    If you are absolutely convinced this is a PUN issue, I'd need a minimal repro case to look into this. Something which is only a few lines of code beyond what PUN 2 adds to the project plus a scene. Send us a download link and the repro steps to: developer@photonengine.com.

  • Well I'm not absolutely convinced but it doesn't look like it is pointing to the wrong PV and they appear to both be in the same room as they can both see eachother move. I'll probably set up a repro case sometime this week then if I can't figure it. Thank you.

  • robbie
    robbie
    Answer ✓

    Never mind, Photon was working fine all along. My build was just taking input from the controller while in the background. The Input System Package Background Behavior was set to "Reset and Disable Non Background Devices" I changed it to "Reset And Disable All Devices" now it works.

  • Ah! Tricky.

    Glad you found it and thanks for posting the solution!