Skip to content

feat: Add "RemoveNetworkPrefab" which is necessary for certain addressables implementations#1950

Merged
ShadauxCat merged 8 commits intodevelopfrom
feat/remove_network_prefab
May 18, 2022
Merged

feat: Add "RemoveNetworkPrefab" which is necessary for certain addressables implementations#1950
ShadauxCat merged 8 commits intodevelopfrom
feat/remove_network_prefab

Conversation

@ShadauxCat
Copy link
Copy Markdown
Collaborator

@ShadauxCat ShadauxCat commented May 9, 2022

Discovered in scenario week: For Addressables use cases that involve dynamically loading and unloading things to keep the memory footprint low, the lack of a RemoveNetworkPrefab makes it impossible to unload them properly.

Changelog

  • Added: Added NetworkManager.RemoveNetworkPrefab to remove a prefab from the prefabs list

Testing and Documentation

I'll add tests in another commit to be added to this PR soon.

  • Includes unit tests.
  • Documentation will come with updates for addressables.

@ShadauxCat ShadauxCat requested a review from a team as a code owner May 9, 2022 21:41
}
}

public void RemoveNetworkPrefab(GameObject prefab)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll add tests and in another commit.

why not in this PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It'll be in this PR, I just haven't done it yet.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm trying getting the PR up without tests first so people can start reviewing it while I write the tests. Thought it'd be a little more parallelizable that way.

ShadauxCat and others added 4 commits May 9, 2022 16:42

### Added

- Added `NetworkManager.RemoveNetworkPrefab(...)` to remove a prefab from the prefabs list (#1950)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just a note that this PR will also be considered for backport to release/1.0.0 for 1.0.0-pre.10

@ShadauxCat ShadauxCat enabled auto-merge (squash) May 18, 2022 21:49
@ShadauxCat ShadauxCat merged commit e58355d into develop May 18, 2022
@ShadauxCat ShadauxCat deleted the feat/remove_network_prefab branch May 18, 2022 22:49
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