OwnerShip bug ?

Options
Hello,

I'm using the very last version of PUN2 whith unity 2019.
All PUN2 fetures works well, except the following features:
RequestOwnership()
TransferOwnership(...)

I got an unassigned reference exception.

I temporary solved the problem by changing some code in the "PhotonNetworkPart.cs" (line 2093 and 2160)
int[] requestValues = (int[]) photonEvent.Parameters[ParameterCode.CustomEventContent];
changed with:
int[] requestValues = (int[])photonEvent.CustomData;
In addition to thet, it seeams that callback handled with IPunOwnershipCallbacks are not fired !

Comments

  • Tobias
    Options
    Is this in PUN v2.9? If so, please update to PUN v2.10 and have another go.
    It sounds like it's caused by a bug which we fixed in the new version.
    Background: The event class that's used in this case was changed. Initially (v2.9), we overlooked that the .Parameters can now be null and that accessing them with the ParameterCode doesn't work in this case.
  • droidemotion
    Options
    Yes ! this is the very last version (2.10).
    updated from 2.9 yesterday.

    I discovred this problem when simply try to call the view.RequestOwnership () method wich cause an unassigned reference error.

    And in the 2.10 version , i still see reférences to the .Parameters array.

    (I do not cleary understand all the PUN code, but it sound like a bug !)
  • Tobias
    Options
    Ah. I can reproduce the issue and it's a bug, yes.
    This will get fixed exactly the way you did.

    About the callback: Is it fired, when you fixed the Parameters access?
  • droidemotion
    Options
    No, the event are not fired with the modifications.
    i did not search further for the events because , for now,i decide to not use them.