Skip to content

fix: Empty prefab removal on init#919

Merged
jlao merged 1 commit intodevelopfrom
jlao/fix-empty-prefab-cleanup
Jun 28, 2021
Merged

fix: Empty prefab removal on init#919
jlao merged 1 commit intodevelopfrom
jlao/fix-empty-prefab-cleanup

Conversation

@jlao
Copy link
Copy Markdown
Contributor

@jlao jlao commented Jun 23, 2021

This fixes a bug where a list was being removed from while iterated over.

networkPrefabIndexToRemove contains indices of prefabs to remove in ascending order so we need to remove them in reverse order or else the indices all shift and we can an argument exception.

@unity-cla-assistant
Copy link
Copy Markdown

unity-cla-assistant commented Jun 23, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@LukeStampfli LukeStampfli left a comment

Choose a reason for hiding this comment

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

Simple and quick fix! Looks all good to me. Could you please sign the CLA?

@jlao jlao changed the title Fix empty prefab removal on init fix: Empty prefab removal on init Jun 28, 2021
@jlao jlao merged commit f14de77 into develop Jun 28, 2021
@jlao jlao deleted the jlao/fix-empty-prefab-cleanup branch June 28, 2021 15:50
SamuelBellomo added a commit that referenced this pull request Jul 6, 2021
…ity-Technologies/com.unity.multiplayer.mlapi into test/multiprocess-tests/orchestration

* 'test/multiprocess-tests/orchestration' of github.com:Unity-Technologies/com.unity.multiplayer.mlapi:
  feat: log warning if detected child NetworkObjects under a NetworkPrefab (#938)
  fix: reducing log level for noisy log and adding details for developer log (#926)
  feat: users can set authority on network transform programmatically (#868)
  refactor: move NetworkBehaviour update to a separate non-static class (#917)
  test: add utils for multi instance tests (#914)
  test: downgrading testproject to 2020.3.12f1 (#927)
  refactor: decouple PendingSoftSyncObjects from NetworkSpawnManager (#913)
  chore: Change function signature of OnDespawnObject to accept NetworkObject (#928)
  fix: Empty prefab removal (#919)
SamuelBellomo added a commit that referenced this pull request Jul 6, 2021
…rocess-tests/base-multiprocess-tests

* test/multiprocess-tests/orchestration:
  feat: log warning if detected child NetworkObjects under a NetworkPrefab (#938)
  fix: reducing log level for noisy log and adding details for developer log (#926)
  feat: users can set authority on network transform programmatically (#868)
  refactor: move NetworkBehaviour update to a separate non-static class (#917)
  test: add utils for multi instance tests (#914)
  test: downgrading testproject to 2020.3.12f1 (#927)
  refactor: decouple PendingSoftSyncObjects from NetworkSpawnManager (#913)
  chore: Change function signature of OnDespawnObject to accept NetworkObject (#928)
  fix: Empty prefab removal (#919)
SamuelBellomo added a commit that referenced this pull request Jul 6, 2021
…est/multiprocess-tests/execute-step-in-context

* test/multiprocess-tests/base-multiprocess-tests:
  feat: log warning if detected child NetworkObjects under a NetworkPrefab (#938)
  fix: reducing log level for noisy log and adding details for developer log (#926)
  feat: users can set authority on network transform programmatically (#868)
  refactor: move NetworkBehaviour update to a separate non-static class (#917)
  test: add utils for multi instance tests (#914)
  test: downgrading testproject to 2020.3.12f1 (#927)
  refactor: decouple PendingSoftSyncObjects from NetworkSpawnManager (#913)
  chore: Change function signature of OnDespawnObject to accept NetworkObject (#928)
  fix: Empty prefab removal (#919)
SamuelBellomo added a commit that referenced this pull request Jul 6, 2021
…est/multiprocess-tests/adding-perf-tests-for-spawn

* test/multiprocess-tests/execute-step-in-context:
  feat: log warning if detected child NetworkObjects under a NetworkPrefab (#938)
  fix: reducing log level for noisy log and adding details for developer log (#926)
  feat: users can set authority on network transform programmatically (#868)
  refactor: move NetworkBehaviour update to a separate non-static class (#917)
  test: add utils for multi instance tests (#914)
  test: downgrading testproject to 2020.3.12f1 (#927)
  refactor: decouple PendingSoftSyncObjects from NetworkSpawnManager (#913)
  chore: Change function signature of OnDespawnObject to accept NetworkObject (#928)
  fix: Empty prefab removal (#919)

# Conflicts:
#	testproject/Packages/manifest.json
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