Skip to content
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

fix: Invaders hit fx not replicated on player & enemy bullets #113

Merged
merged 3 commits into from Mar 10, 2023

Conversation

fernando-cortez
Copy link
Collaborator

Proposed change(s)

Quick PR to fix player and enemy hit FX not being replicated on clients. Previously they were only spawned on the host. Now, ClientRpcs are used to notify clients to spawn FX at desired location.

Platform and Editor version used to develop and test this PR

  • Windows, 2021.3.18f1

Related links

N/A

Affected sample(s)

  • 2DSpaceShooter
  • Invaders
  • Client Driven
  • API Diorama
  • DynamicAddressablesNetworkPrefabs
  • N/A (please describe)

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • UI/UX (see style guide)
  • Breaking change
  • Documentation update (see style guide)
  • Other (please describe)

Checklist

  • Unit tests pass locally --> n/a right now
  • Added tests, if feasible, that prove my fix is effective or that my feature works
  • No warnings in the Console
  • Documented (///) public APIs (public/protected functionality of public/protected classes), if applicable
  • Updated the sample documentation, if applicable (see style guide)
  • UI & Style sheet changes: both Dark and Light styles/themes updated/tested --> n/a right now
  • Remember to familiarize yourself with the coding conventions

How to test/validate

  1. Clone this branch.
  2. Open it with the aforementioned Unity version.
  3. Open Scene InitBootStrap.
  4. Create a ParrelSync clone. Start a host and a client.
  5. Have a client join the host.
  6. See that enemy bullets hitting the shields spawn FX as well as when player bullets hit enemies on the client.

Other comments

N/A

@fernando-cortez fernando-cortez added the bug Something isn't working label Mar 6, 2023
Basic/Invaders/Assets/Scripts/EnemyBullet.cs Outdated Show resolved Hide resolved
Basic/Invaders/Assets/Scripts/EnemyBullet.cs Outdated Show resolved Hide resolved
Basic/Invaders/Assets/Scripts/EnemyBullet.cs Outdated Show resolved Hide resolved
@fernando-cortez
Copy link
Collaborator Author

Jira item was spawned from conversation here, to add code formatting pass to Bitesize Samples.

@fernando-cortez fernando-cortez merged commit 0600a73 into develop Mar 10, 2023
@fernando-cortez fernando-cortez deleted the fix/invaders-hit-fx-not-replicated branch March 10, 2023 16:09
fernando-cortez added a commit that referenced this pull request Mar 10, 2023
fernando-cortez added a commit that referenced this pull request Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants