Skip to content

refactor: internally breaking, send no longer has client obj parameter #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

mattwalsh-unity
Copy link
Contributor

After working on the AOI stuff, it dawned on me that passing in the client object into send is less and less useful. In fact I think we can remove it.

@0xFA11
Copy link
Contributor

0xFA11 commented Dec 15, 2020

what does "internally breaking" mean?
also I want to ask just in case, have you tested these changes in isolation?

@mattwalsh-unity
Copy link
Contributor Author

To my thinking, internally breaking just means code that's internal to the project has a (slight in this case) API change.

I guess it does ask the question whether users would ever call InternalMessaging.Send() themselves. If so, it's a regular breaking change.

@0xFA11
Copy link
Contributor

0xFA11 commented Dec 15, 2020

To my thinking, internally breaking just means code that's internal to the project has a (slight in this case) API change.

I guess it does ask the question whether users would ever call InternalMessaging.Send() themselves. If so, it's a regular breaking change.

oh okay, I see.

well, they can't because they are entirely internal :)

internal static class InternalMessageSender
internal static class InternalMessageHandler

Copy link
Contributor

@0xFA11 0xFA11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

NoelStephensUnity added a commit that referenced this pull request Dec 16, 2020
Left out the SpawnManager changes (PR #407) which was merged into the RPC queue branch prior to the migration.
@mattwalsh-unity
Copy link
Contributor Author

mattwalsh-unity commented Dec 16, 2020

For the record, in a slack convo w/ @TwoTenPvP on the question of break the current AOI system before bringing in the new one, I wrote...

At least from what I could see, the part that is being removed is a 'just before transmission' check if the target object has visibility for that client id and from looking at the code, that seemed to be a final last-ditch check in case other parts of the library don't filter it first.

e.g. NetworkedObject.cs checks for this in 9 places, so does NetworkedBehaviour.cs, in particular before updating network variables or sending RPCs

So I didn't think I was removing / breaking AOI so much as removing that one last safeguard to clean up the send interface and prepare for the new AOI stuff

Or to put it another way, seemed to me the role of send is to, well, send, and the elements above it should be on the hook for filtering what gets sent.

@TwoTenPvP was going to check my work and then help me understand whether this would break (current) AOI

@unity-cla-assistant
Copy link

unity-cla-assistant commented Dec 17, 2020

CLA assistant check
All committers have signed the CLA.

@mattwalsh-unity mattwalsh-unity merged commit 03e6018 into develop Dec 17, 2020
NoelStephensUnity added a commit that referenced this pull request Dec 17, 2020
Left out the SpawnManager changes (PR #407) which was merged into the RPC queue branch prior to the migration.
jeffreyrainy pushed a commit that referenced this pull request Dec 18, 2020
Left out the SpawnManager changes (PR #407) which was merged into the RPC queue branch prior to the migration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants