Skip to content

test: Added MultiInstanceHelper for multi-instance runtime tests #817

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 4 commits into from
May 11, 2021

Conversation

TwoTenPvP
Copy link
Contributor

No description provided.

@0xFA11
Copy link
Contributor

0xFA11 commented May 10, 2021

I don't necessarily understand and see the immediate use-cases for these (except Create & Start).
Do you mind explaining further?

@TwoTenPvP
Copy link
Contributor Author

I don't necessarily understand and see the immediate use-cases for these (except Create & Start).
Do you mind explaining further?

#822 This is a good test showing the usage of most of the features.

@mattwalsh-unity
Copy link
Contributor

I'd like to understand the relationship here with NetworkManagerHelper. Are they distinct? Can they / should they be combined?

@NoelStephensUnity
Copy link
Collaborator

NoelStephensUnity commented May 11, 2021

I'd like to understand the relationship here with NetworkManagerHelper. Are they distinct? Can they / should they be combined?

@TwoTenPvP @mattwalsh-unity
I think the two could easily be combined to some degree or another.
With the multi-manager stuff there would be some changes in how it instantiated the NetworkManager.

NetworkManagerHelper provides common methods and patterns to create a NetworkManager instance, create, spawn, and add unique behaviour components to newly created GameObjects with a NetworkObject Component. It automatically cleans up the newly created GameObjects/NetworkObjects (if created through NetworkManagerHelper), and cleans up the NetworkManager instance.

MultiInstanceHelper provides some much needed helper methods that allows one to work within multiple NetworkManager instances under the same process. Obviously it helps to create and track both instances, but most importantly it helps one to be able to find the "right version of a NetworkObject" relative to the NetworkManager instance.

So, I think there should be a way to, at a minimum, get one of the two helper classes to use the other.

I will look over both closer... but I am thinking that perhaps NetworkManagerHelper could just have some additional parameters (or perhaps a struct with properties) that defines the number of clients beyond the host-client.

Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

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

LGTM!

@TwoTenPvP TwoTenPvP enabled auto-merge (squash) May 11, 2021 15:57
@TwoTenPvP TwoTenPvP merged commit 3afda53 into develop May 11, 2021
@TwoTenPvP TwoTenPvP deleted the multi-instance-helper branch May 11, 2021 16:33
SamuelBellomo added a commit that referenced this pull request May 13, 2021
* develop:
  refactor: Minor updates for unique editor unit tests with updated comments (#801)
  test: Added MultiInstanceHelper for multi-instance runtime tests (#817)
  test: connection approval and invalid NetworkPrefabs within NetworkConfig.NetworkPrefabs (#825)
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.

4 participants