Skip to content

Conversation

@RikuTheFuffs
Copy link
Contributor

@RikuTheFuffs RikuTheFuffs commented Feb 13, 2025

Description

  1. Replaced legacy input system with the new one
  2. Moved Anticipation Sample from "Experimental" folder to being a scene of the Multiplayer Use Cases sample (actually copied: the Experimental version of the sample will be removed once the sample scene is fully integrated into Multiplayer Use Cases' workflows)
  3. Anticipation sample's scene now is URP-based and not built-in renderer based
  4. Anticipation sample's scene in Use Cases now uses UIToolkit instead of UGUI or IMGUI

Issue Number(s)

Contribution checklist

  • Tests have been added for the project and/or any internal package
  • Release notes have been added to the project changelog file
  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • JIRA ticket ID is in the PR title or at least one commit message
  • Include the ticket ID number within the body message of the PR to create a hyperlink

How to test

  1. Clone this branch
  2. Open the Multiplayer use Cases sample (it's in the "Basic" folder) using Unity 6000.0.23f1
  3. Open the "Anticipation" scene
  4. Open the Multiplayer Play Mode (MPPM) Window (windows > Multiplayer > Multiplayer Play Mode)
  5. Enable a virtual player in MPPM
  6. Enter Play mode
  7. Press "Server" in one of the two players
  8. Press "Client" in the other player
  9. From the player playing as a Client, use WASD or directional arrows to move the character
  10. From the player playing as a Client,, check that the sliders react to your clicks, and that values displayed on the UI are eventually overwritten by the server

Side note: there should be no loss of functionality from the Anticipation sample in the "Experimental" folder of the repository

@RikuTheFuffs RikuTheFuffs changed the title Anticipation Sample - Unity 6 upgrade Anticipation Sample - Unity 6 upgrade (#MTT-8661) Feb 13, 2025
@RikuTheFuffs RikuTheFuffs marked this pull request as ready for review March 18, 2025 14:15
@RikuTheFuffs RikuTheFuffs requested a review from a team as a code owner March 18, 2025 14:15
@Elfi0Kuhndorf
Copy link
Contributor

Elfi0Kuhndorf commented Mar 21, 2025

One issue I found is when I press the apply button it gets a socket failed error
image

@RikuTheFuffs
Copy link
Contributor Author

Works as expected! One issue I found is when I press the apply button it gets a socket failed error

Looking at the stack trace, it seems to be a Unity Transport bug. the Latency and Jitter are correctly applied even with that error showing up. I don't think we can do much about it apart from reporting it to the Transport team.

@RikuTheFuffs
Copy link
Contributor Author

RikuTheFuffs commented Mar 21, 2025

It only happens when I try to apply something from the host, maybe that is expected somehow? when using apply with a client it works

Yes, I'll ask 👀
EDIT: done here

@Elfi0Kuhndorf
Copy link
Contributor

It also failed now once or twice when working with client.
image
But also it talks about changing the top slider will update the bottom slider. I do not see any slider following another one here. How does it work, wasn't the layout different before?

@RikuTheFuffs
Copy link
Contributor Author

it talks about changing the top slider will update the bottom slider. I do not see any slider following another one here. How does it work, wasn't the layout different before?

Nice catch, the layout was different before. I changed it after updating the label, and forgot to update the text. Will do it now!

@Elfi0Kuhndorf
Copy link
Contributor

image
The explanation looks good! Just one thing I am wondering is to maybe explain the shadow to users when moving with WASD, e.g. does it display what the server is anticipating or how the client is moving?

@RikuTheFuffs
Copy link
Contributor Author

maybe explain the shadow to users when moving with WASD,

That's what we'll do in the tutorial ( https://jira.unity3d.com/browse/MTT-8702 )

e.g. does it display what the server is anticipating or how the client is moving?

The ghost displays where the player is on the server, while the non-ghost is the anticipated position of the player (= where the Client thinks the server player will end up being). The ghost following the player's trail is the "Reconciliation" part of the process.

@Elfi0Kuhndorf
Copy link
Contributor

A tutorial perfect that settles things then! And thanks for the explanation, so ghost is server and non-ghost is the anticipation of the client.

Copy link
Contributor

@Elfi0Kuhndorf Elfi0Kuhndorf left a comment

Choose a reason for hiding this comment

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

Looks good!

@RikuTheFuffs RikuTheFuffs merged commit 7c07a52 into develop Mar 21, 2025
30 checks passed
@RikuTheFuffs RikuTheFuffs deleted the sample-anticipation/u6-upgrade branch March 21, 2025 15:29
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