Skip to content

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

Merged
mattwalsh-unity merged 1 commit intodevelopfrom
feature/send_no_client_obj
Dec 17, 2020
Merged

refactor: internally breaking, send no longer has client obj parameter#407
mattwalsh-unity merged 1 commit intodevelopfrom
feature/send_no_client_obj

Conversation

@mattwalsh-unity
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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