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

chore: test project updates 2023-Q3 #2679

Merged
merged 6 commits into from
Aug 28, 2023

Conversation

NoelStephensUnity
Copy link
Collaborator

This PR just contains several clean up related fixes for NGO's test project samples and manual tests.

  • Several samples were still using UNet and were switched over to use UnityTransport.
  • Some samples/manual tests were updated to have their own network prefab list.
  • Several updates in the physics sample:
    • Reduced the number of ray-cast line renderers down to just 1 (really only needed one)
      • It now spans the entire width of the level and changes color when a physics body passes through it.
    • Physics player now has a line renderer pointing in the player's forward direction (to determine which way you are moving)
    • Limited the number of total balls to spawn (made it adjustable)
  • Connection Mode Buttons now automatically become visible after the NetworkManager is shutdown
  • Added some safety checks for some classes that might or might not have certain UI elements defined to avoid exceptions.

Testing and Documentation

  • No tests have been added.
  • No documentation changes or additions were necessary.

This fixes an issue where ConnectionModeScript and/or StatsDisplay would throw an exception if certain optional properties were not defined.
Minor adjustment to the Spawner class where if the frequency of spawning is set to zero it will only spawn 1 instance (i.e. a one shot spawner).
Updated several samples to use UnityTransport as opposed to UNet.
Limited number of objects spawned, adjusted the ray cast line renderer, updated the physics player to have a ray pointing towards its forward (to know the direction you are going) in physics example.
Adjusted the connect mode buttons so they will automatically re-appear when you disconnect.
Updated several projects to have their own network prefab list.
.
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner August 25, 2023 18:57
m_AuthenticationButtons.SetActive(NetworkManager.Singleton && !NetworkManager.Singleton.IsListening && !AuthenticationService.Instance.IsSignedIn);
if (m_ConnectionModeButtons != null)
{
m_ConnectionModeButtons.SetActive(false || AuthenticationService.Instance.IsSignedIn);
Copy link
Collaborator

Choose a reason for hiding this comment

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

...ok, I know this isn't your code, but isn't false || IsSignedIn literally identical to just IsSignedIn? false || false => false, false || true => true...

This seems... really silly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah... I wasn't sure what that was all about...
It really should just be checking AuthenticationService.Instance.IsSignedIn...

@NoelStephensUnity NoelStephensUnity merged commit dd015bf into develop Aug 28, 2023
1 check passed
@NoelStephensUnity NoelStephensUnity deleted the chore/test-project-updates-2023-Q3 branch August 28, 2023 18:43
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.

2 participants