Why is my Custom Properties not working PUN 2?

Options

Whenever I send PhotonNetwork.LocalPlayer.SetCustomProperties(); it wont call the function OnPlayerPropertiesUpdate(). I am using unity and have tried calling a _Debug() function with a Debug.Log(), and it wont call the _Debug(). I messed with the RoomSettings and still nothing worked. All the functions work Locally but they wont work over the server. Can someone help me?


Best Answer

  • Blissfly1234
    Answer ✓
    Options

    Problem Fixed:


    I am using the new Unity Input System, and I had the OnEnable() on OnDisable() functions set as a private variable. This was causing them to be overwritten by the other functions. To fix this I set each to a public override function and added base.OnEnable(); and base.OnDisable();. After this everything synced over.

Answers

  • robertryan
    edited August 2022
    Options

    Whenever I send PhotonNetwork.LocalPlayer.SetCustomProperties(); it wont call the function OnPlayerPropertiesUpdate().

    I am using unity and have tried calling a _Debug() function with a Debug.Log(), and it wont call the _Debug().

    I messed with the RoomSettings and still nothing worked.

    All the functions work Locally but they wont work over the server.


    Bugarsky & Navarro, LLC

  • Blissfly1234
    Answer ✓
    Options

    Problem Fixed:


    I am using the new Unity Input System, and I had the OnEnable() on OnDisable() functions set as a private variable. This was causing them to be overwritten by the other functions. To fix this I set each to a public override function and added base.OnEnable(); and base.OnDisable();. After this everything synced over.