Are all the steps necessary?

When we run the method to change the display name to “My New Name”, it seems to be a 4 step process:

  1. call SetMyName
  2. which calls the Command CmdSetDisplayName
  3. which calls the Server method SetDisplayName
  4. which updates the SyncVar, calling HandleDisplayTextUpdated

In trying to wrap my head around why so many steps, I modified SetMyName to call the Server method SetDisplayName directly, skipping the Command. This seems to work also. So why exactly do we need the Command?

1 Like

After a bit more testing, it appears the behavior depends on if I make changes in the Host vs the client.

If I make the changes in the host then the changes reflect in the client, but if I do it in the client then it doesn’t change in the host.

Im guessing that since the host is the server + client that any changes made there automatically get changed on the server also. Does that sound right?

This topic was automatically closed after 13 days. New replies are no longer allowed.

Privacy & Terms