BoltEngine / Bolt-Tracker

New issue tracker for Photon Bolt
10 stars 2 forks source link

Inconsistent design and deprecation #181

Closed SubtleTechnology closed 3 years ago

SubtleTechnology commented 3 years ago

How to reproduce issue

GlobalEventListener now has several deprecated virtual functions without the token parameter, but left SceneLoadLocalDone, and SceneLoadRemoteDone with both token and no-token virtuals.

Internally, bolt only calls the non-token method when it has no token and the method with token if it does. However, other methods like ConnectAttempt do not have the non-token versions - they get called and simply pass NULL for the token.

Expected Behavior

Mark SceneLoadLocalDone and SceneLoadRemoveDone as deprecated and remove them later. All virtual methods should have the token parameter and pass null if it's empty if the method supports tokens.

Actual behavior

You see the deprecated warning and mindfully update all your overrides to use the tokenized parameter versions (even though you don't use any tokens). Everything else happens and runs fine but now SceneLoadLocalDone and SceneLoadRemoveDone callbacks no longer happen and you have no idea why.

Configuration

ramonmelo commented 3 years ago

Fixed on the next release.

Thanks for your feedback.