Merry Fragmas 3.0 Q&A

Hi All,

I’ve watched all three Merry Fragmas videos and would HIGHLY recommend it.
Mike Geig has done an AWESOME job.
Watch on YouTube, Unity’s website or Twitch:
YouTube: Live Training - Merry Fragmas 3.0 - Playlist | Direct: Part1, Part2, Part3
Unity Website: Live Session: Merry Fragmas 3.0 | Direct: Part1, Part2, Part3
Twitch: All Videos Direct: Part1, Part2, Part3

Mike’s also done the particle effects as a separate video on his own channel: Merry Fragmas 3.0 Particle Settings which I haven’t watched yet.

I’m in the process of working through them all the videos at the moment and noticed that there doesn’t seem to be a thread specific for Merry Fragmas 3.0.

So here is a thread, to provided support for people working through the videos. As more people finish the videos, they could provide support for others working thru them.

While Mike mentioned to contact him and the others via Twitter, searching thru tweets first to see if someone has asked the question is not my cup of tea. :wink:

But incase this ever happens to you…
Don’t be like Mike, Apply your Changes!

YouTube Sound bite: 47m42s
Cannot use a embedded link as position gets wiped :frowning:

2 Likes

FAQ
Instead of having to search thru this thread as it becomes larger, this post will hold any FAQs pointing to answer post, I’ll group them under headings as it gets larger

That shouldn’t happen. Are you sure you dragged the player prefab and NOT the player object in the scene onto the player prefab of the game manager?

If your player health does not go back to player health max after dying, check to make sure that you put Player Health script in “On Toggle Shared” under your Player Prefab.

Hi @richardboegli , thanks for creating this thread. Sorry for posting in the other thread, when I did a search for

IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:34 pos:34
UnityEngine.Networking.NetBuffer.ReadByte () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkBuffer.cs:36)

and for host id out of bound id {0} max id should be greater 0 and less than {0}, the other thread showed up, and not this one.

Remove and re-add the network identity component on the player prefab. Make sure to hit apply” << tried this, it didn’t work for me. T-T

The other thing: when I asked people in the Unity Discord chat group, everyone was saying that Unity Networking doesn’t play well with Awake()?? All the advice that they’ve given me is to either not use Unet or not use Awake(). Is that true???

Anyway, I’m gonna repost my question from https://forum.unity3d.com/threads/merry-fragmas-3-0-stopped-working.448278/#post-2902042 here so everything’s all in one place. (Also, I spent a long time gathering all this data, that’s why I didn’t refresh that other page lol!)

I have the same error message, but my progress was towards the end of the 2nd video. So it was only until after I did the IK for the hands in the 2nd video (https://unity3d.com/learn/tutorials/topics/multiplayer-networking/merry-fragmas-30-ui-graphics-and-animations?playlist=29690), then I started getting these errors. But prior to that step, everything worked properly the same way as the tutorial.

```csharp
host id out of bound id {0} max id should be greater 0 and less than {0}
0x0000000141509B9B (Unity) StackWalker::GetCurrentCallstack
0x000000014150B84E (Unity) StackWalker::ShowCallstack
0x00000001414DA963 (Unity) GetStacktrace
0x00000001411DCBFA (Unity) DebugStringToFile
0x00000001411DD06C (Unity) DebugStringToFile
0x0000000140CC8ED3 (Unity) UNET::NetLibraryManager::CheckHost
0x0000000140CD013A (Unity) UNET::NetLibraryManager::popDataFromHost
0x00000001416BDB3E (Unity) NetworkTransport_CUSTOM_ReceiveFromHost
0x0000000027F21807 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Networking.NetworkTransport:ReceiveFromHost (int,int&,int&,byte[],int,int&,byte&)
0x0000000027F1B330 (Mono JIT Code) [NetworkClient.cs:698] UnityEngine.Networking.NetworkClient:Update ()
0x0000000027F1AD0D (Mono JIT Code) [NetworkClient.cs:950] UnityEngine.Networking.NetworkClient:UpdateClients ()
0x0000000027F1A984 (Mono JIT Code) [NetworkIdentity.cs:1073] UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate ()
0x000000000D090A8E (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007FFFCE9154A3 (mono) [mini.c:4937] mono_jit_runtime_invoke
```

I get them when I click on the Network Manager in the Hierarchy. The errors keep on repeating forever even if I don't hit the play button in the editor.

Other symptoms:

**If I use the standalone instance as the host and the editor as the LAN client:**
- In the Hierarchy, neither of the players network objects appear.
- In the Scene view, none of the networked players appear (only the one inside the Construct scene appears).
- In the Game view of the editor (which is the LAN client), none of the players appear (only the one inside the Construct scene appears).

**If I use the editor as the host and the standalone instance as the LAN client:**
- In the Hierarchy, ALL the players appear.
- In the Scene view, ALL the players appear.
- In the Game view of the editor (which is the LAN host), ALL of the players appear.
- (please see the screenshot in the attachment) The FirstPersonController script and the FirstPersonCharacter of the remote/not local player are not active, even if the PlayerBehaviorInNetworking script (in the turorial, this script is called "Player") has them toggled to be active.

**For both versions:**
- The local player can move, can shoot things, and the kill count increases if the raycasts hit the "remote" player.
- There is this harsh sound like a TV with static. This sound stops when the local player's "feet" leave the ground (like when the player is jumping).
- The remote player is floating in the air, but the idle animation plays. When the "remote" player is shot, it does not play the "death" animation, and just disappears (previously, the death animation was able to play).
- The editor's console has this error message (occurred once):

```csharp
IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:34 pos:34
UnityEngine.Networking.NetBuffer.ReadByte () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkBuffer.cs:36)[/INDENT]
```

.
- The editor's console has these warnings (multiple of them):

```csharp
[INDENT]Did not find target for sync message for 2
0x0000000141509B9B (Unity) StackWalker::GetCurrentCallstack
```

&

```csharp
Did not find target for sync message for 3
0x0000000141509B9B (Unity) StackWalker::GetCurrentCallstack
0x000000014150B84E (Unity) StackWalker::ShowCallstack
0x00000001414DA963 (Unity) GetStacktrace
0x00000001411DCBFA (Unity) DebugStringToFile
0x00000001411DD06C (Unity) DebugStringToFile
0x0000000141166C78 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x00000000322F82FB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
0x00000000322F81E4 (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x00000000322F7B75 (Mono JIT Code) [Logger.cs:42] UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x00000000322F73B6 (Mono JIT Code) [DebugBindings.gen.cs:157] UnityEngine.Debug:LogWarning (object)
0x00000000322F6E81 (Mono JIT Code) [ClientScene.cs:717] UnityEngine.Networking.ClientScene:OnUpdateVarsMessage (UnityEngine.Networking.NetworkMessage)
0x0000000023918A2A (Mono JIT Code) [NetworkConnection.cs:468] UnityEngine.Networking.NetworkConnection:HandleReader (UnityEngine.Networking.NetworkReader,int,int)
0x0000000023917EFB (Mono JIT Code) [NetworkConnection.cs:424] UnityEngine.Networking.NetworkConnection:HandleBytes (byte[],int,int)
0x0000000023917D9F (Mono JIT Code) [NetworkConnection.cs:576] UnityEngine.Networking.NetworkConnection:TransportRecieve (byte[],int,int)
0x0000000023908D83 (Mono JIT Code) [NetworkClient.cs:735] UnityEngine.Networking.NetworkClient:Update ()
0x0000000023907FBD (Mono JIT Code) [NetworkClient.cs:950] UnityEngine.Networking.NetworkClient:UpdateClients ()
0x0000000023907C34 (Mono JIT Code) [NetworkIdentity.cs:1073] UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate ()
0x000000000AFC0A8E (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007FFFCE9154A3 (mono) [mini.c:4937] mono_jit_runtime_invoke
0x00007FFFCE8683F1 (mono) [object.c:2623] mono_runtime_invoke
0x00000001411F985F (Unity) scripting_method_invoke
0x0000000140E2E1A5 (Unity) ScriptingInvocation::Invoke
0x0000000140CC5E5F (Unity) UNET::ScriptingUpdater::playerLoopUpdate
0x0000000140BC01AD (Unity) PlayerLoop
0x000000014147B5C2 (Unity) Application::UpdateScene
0x000000014147CB8F (Unity) Application::UpdateSceneIfNeeded
0x0000000141485454 (Unity) Application::TickTimer
0x00000001415477AE (Unity) FindMonoBinaryToUse
0x0000000141548DD1 (Unity) WinMain
0x0000000141863E94 (Unity) strnlen
0x00007FFFFBBC8364 (KERNEL32) BaseThreadInitThunk
0x00007FFFFBEC70D1 (ntdll) RtlUserThreadStart
```

- Whichever is the LAN client, the first person camera is not turned on & the player who is the LAN client cannot move, and floats in the air in the screen of whoever is the host.

This error message comes out sometimes, but not all the time:

```csharp
<RI.Hid> Failed to create device file: 2 The system cannot find the file specified.
```

Despite the timing and circumstances of when I started getting the error messages, the error messages seem to lean more towards a networking issue, but I'm not sure. I tried looking online but those solutions seem either unrelated to my issue, or they are just questions in the Unity forums with no answers.

__*It appears that NetworkReader.ReadByte is an array, and something is trying to access the outside of that array. Is there a way to go into the code to see what's trying to do that? Is this even a good idea??*__

On Unity 5.5.0f3, running Windows10, if that helps.

Before that, everything worked the same as the videos. So it was only until after I did the IK for the hands in the 2nd video, then I started getting these errors.

**Things that I've tried to troubleshoot:**
- I went through all the code again and through all the videos again to make sure that everything is the same and that I didn't miss anything, including the placement of scripts & GameObjects in PlayerBehaviorInNetworking script (in the turorial, this script is called "Player").

- https://forum.unity3d.com/threads/understanding-networkreader-readbyte-out-of-range-errors.361115/
The person said that they just rebuilt everything, which I did. I tried refreshing everything in the editor, applied the changes to the prefabs, and saved everything. Then rebuilt the standalone.

- http://answers.unity3d.com/questions/1170290/unet-indexoutofrangeexception-networkreaderreadbyt.html
I didn't see anything on the script that was serialized or deserialized.

- http://answers.unity3d.com/questions/1104570/unet-transport-layer-host-id-is-out-of-bound-0.html
This looks different than what we are going through.

- https://forum.unity3d.com/threads/indexoutofrangeexception-networkreader-readbyte-out-of-range-problem.368631/
This one says that it's caused by:
[quote]
- you are attempting to connect a client built from older or newer versions of the scripts to a server
- you have a mismatch in the number of bytes written and read in an OnSerialze and/or OnDeserialize method
[/quote]
I tried refreshing everything in the editor, applied the changes to the prefabs, and saved everything. Then rebuilt the standalone. Is there a cache or something that's keeping the older version of the scripts? If that's the case, how do we refresh that so it has the latest version?

- https://forum.unity3d.com/threads/host-id-out-of-bound-id-error-on-tank-demo.333596/
- http://answers.unity3d.com/questions/1104570/unet-transport-layer-host-id-is-out-of-bound-0.html
Are these the same as our problem??!??

Any help is totally welcome. Thanks in advance!! ^__^![2902042--213667--networkreader-readbyte-out-of-range-captioned.png|740x978](upload://rHSgq5pp4IIhdxVyBRApueocfew.png)

(By the way, hi @Mike-Geig !! This is Tsai_Ming_Li from Twitch! ^__^)

(Edited formatting for clarity.)

Hey guys.
Thanks for Merry Fragmas. It’s been a great tutorial.
Like BerniceChua, I started getting IndexOutOfRangeException: NetworkReader: ReadByte out of range: NetBuf sz:30 pos:30.

One thing I noticed was that if I stop and try to rejoin the client multiple times, eventually I get the error about Spawn Position not found… Don’t know that it has anything to do with it.

I’ve started the tutorial over a couple times because in video one I encountered this a couple times but this time I was at the point of binding IK for the hands to the hand points…(In fact I built RIGHT before that it worked great)

1 Like

Hi @richardboegli , out of desperation, I retried this technique of removing and putting back the Network Identity component. This time it worked. I guess the first time I did it, it was still bugged?

Hi @Mighteemouse , based on what people in this thread and this other thread were observing, the timing of when the bug happens is random. Please try what @richardboegli recommended, which is to remove and put back the Network Identity component. (Please note that if you do this, you’ll also need to first remove the Player script component, the Network Transform component, the Player Shooting script, the Player Health script, the Network Animator script, and the Gun Position Sync script; then put them all back after. You’ll need to do this, because all of the scripts mentioned depend on the Network Identity script, so you can’t remove the Network identity script without removing those.)

Anyway, for this error message:

IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:34 pos:34
UnityEngine.Networking.NetBuffer.ReadByte () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkBuffer.cs:36)

One of the other things I’ve seen when I researched for a troubleshooting solution (which I wrote in my original post):

I think this might be the underlying reason why there’s a bug in Network Identity.

Is there a cache or something that’s keeping the older version of the scripts? If that’s the case, how do we refresh that so it has the latest version?

Putting my questions in individual posts, so it’s easier to digest:

For this error message:

IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:34 pos:34
UnityEngine.Networking.NetBuffer.ReadByte () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkBuffer.cs:36)

One of the other things I’ve seen when I researched for a troubleshooting solution (which I wrote in my original post):

I think this might be the underlying reason why there’s a bug in Network Identity.

Is there a cache or something that’s keeping the older version of the scripts? If that’s the case, how do we refresh that so it has the latest version?

@BerniceChua I ended up doing what @richardboegli had suggested and it got rid of the error but I didn’t take good enough screenshots or something and my character models ended up running in place but it connected…
Instead I used Collab (thank you Unity Team… it allows me to fulfill my saying of “Check in early and check in often”) and rolling back to just before I started working on the gun pivot.
You do raise a good question of whether there is some form cache that keeps older versions because the oddity i found when i removed everything (and applied the prefab Mike) as soon as I added the Player script back in, it brought in the Network Identity component right along with it which I found a little… off…

Anyway… I’m back to it… Thank you again Unity Team for Collab… Source Code control is your friend.

Hi everyone. My game system seems to work fine. However the visuals only work correctly if you are the host.
The Issue with the health appearing as 0 is only fixed on the client. I’ll show what it looks like on the host and then the client.

Host:

Client:
The lobby name and color aren’t applied in the client view. Again I will show a comparison between host and client.
Host:
Client:

After I took these pictures, I managed to solve why the text won’t face the player. I forgot to disable the PlayerNameCanvas but I don’t understand why everything works fine on the host but doesn’t work on the clients.

Can someone send me a copy of the project getting these index and serialize errors? I’ve never seen that and would like to play with it.

1 Like

Hi @Mike-Geig , thanks for all your help!! :slight_smile:

Sorry, I don’t have the errors anymore, because I removed and put back the Network Identity like @richardboegli suggested. But if it comes up again, I’ll post the link to my GitHub here.

OR another person who has the error(s) can send his or her work.

I have another question though. What’s the best way to test and troubleshoot sounds? In my post above, I mentioned that

The sound seems to come from the player when it touches the “ground”, and I turned off Foot IK. Aside from that, where else can people look to troubleshoot that? Thanks in advance.

Well crud @Mike-Geig I rolled back. If I get it again, I’ll get it to you.

Well @Mike-Geig that didn’t take long, forgive my newbie-ness of the forums, what is the best way to get you a copy of the project with the error?
I could add you as a user in my Collab and you could get it there (how dare i check in broken code!!! ;))
It’s about 1GB zipped?

By the way, I’m using Personal Edition if you think that may make a difference.

I think that’s the last edit…

You can add me in Collab. Otherwise, dropbox, drive, etc will work too. Be sure to zip it without the library or build folders

The thing about this is that in Awake(), the object doesn’t know anything about its networked state. It doesn’t know if it a server, client, local, etc. Otherwise, it is fine to use them together, just not for networking things.

I have yet to see those errors ever. I even opened someone else’s project who had those errors and I didn’t get them. Therefore, I suspect something with the library folder. Try closing Unity, deleting the library folder, and then letting it rebuild. See if the problem persists. If so, send me a copy of it because I am curious

Hmmm, perhaps this is a bug with uNet interactions with Collab? I’ve never gotten these errors, but I have also never used Collab with uNet. I know Collab keeps a cache and perhaps that is where our mismatch is coming from. Does anyone else use Collab and also get these issues?

Did you spell the SyncVar hooks correctly? It must be an error somewhere in your code. Feel free to post relevant bits for use to check out

I have also noticed that before and not just in Unity. Do you happen to have an Asus motherboard in your computer? I do and it has terrible audio noise that has something to do with screen brightness and also proximity to objects in Unity. I know that sounds super weird, but that has been my experience with my motherboard. Eitherway, I know exactly the sound you are talking about, but I’ve never figured out how to fix it. It only happens on this computer for me.

Happy New Years!

1 Like

@Mike-Geig - Unintended side effect of disabling capsule (Video 2 - 3m27s) and putting it into remote. Player do not cast a shadow for themselves anymore…

True, you could set renderers to “Shadows Only” if having first person shadows is important to you.

1 Like

I’ve tested around in order to see which scripts are working properly. The lobby hook script is passing the information to the player.
2905338--214000--Passed Values.PNG
However the values are not being applied to any client players.
2905338--214008--NoMesh color.PNG 2905338--214009--Client game object names.PNG
Here is the player script I’m pretty sure that the syncvar functions are typed in correctly.

using UnityEngine;
using UnityEngine.Networking;    //Allows Networking features
using UnityEngine.Events;        //Allows use of events
using UnityEngine.UI;            //Allows UI features
using System.Collections.Generic;    //Allows use of Lists

[System.Serializable]
public class ToggleEvent  : UnityEvent<bool>{}

    public class Player : NetworkBehaviour {
        [SyncVar (hook = "OnNameChanged")] public string playerName;    //Player name
        [SyncVar (hook = "OnColorChanged")] public Color playerColor;    //Player color

        [SerializeField] ToggleEvent onToggleShared;    //Toggle for shared events, viewable in editor.
        [SerializeField] ToggleEvent onToggleLocal;        //Toggle for local events, viewable in editor.
        [SerializeField] ToggleEvent onToggleRemote;    //Toggle for remote events, viewable in editor.
        [SerializeField] float respawnTime = 5f;        //How long it takes for the player to revive
        [SerializeField] CandyCaneMaterialSwitcher candyCaneSwitcher;    //Switches candy cane material

        static List<Player> players = new List<Player> ();    //List of players

        GameObject mainCamera;        //Main Camera for the local player to enable and disable
        //NetworkAnimator anim;        //Network animator

        //Occurs on startup
        void Start(){
            //Gets a reference to the NetworkAnimator
            //anim = GetComponent<NetworkAnimator> ();

            //Sets the mainCamera to be the main camera in the scene
            mainCamera = Camera.main.gameObject;

            //Calls the EnablePlayer function
            EnablePlayer();
        }

        [ServerCallback]    //Function runs on servers
        //When the object is enabled
        void OnEnable(){
            //If players list does not contain this player
            if (!players.Contains (this)) {
                //Adds this player to the list of players
                players.Add (this);
            }
        }

        [ServerCallback]    //Function runs on servers
        //When the object is enabled
        void OnDisable(){
            //If players list does contain this player
            if (players.Contains (this)) {
                //Removes this player to the list of players
                players.Remove (this);
            }
        }

        //Occurs every frame
        /*void Update(){
            //if the player isn't the local player
            if (!isLocalPlayer) {
                return;
            }

            anim.animator.SetFloat ("Speed", Input.GetAxis ("Vertical"));
            anim.animator.SetFloat ("Strafe", Input.GetAxis ("Horizontal"));
        }*/

        //Disables the player
        void DisablePlayer(){
            //If the player is the local player
            if (isLocalPlayer) {
                //Hides the player reticule
                PlayerCanvas.canvas.HideReticule ();
                //enables the main camera
                mainCamera.SetActive (true);
            }

            //Sets all events in onToggleShared to false
            onToggleShared.Invoke (false);

            //If the player is local
            if (isLocalPlayer) {
                //Sets all events in onToggleLocal to false
                onToggleLocal.Invoke (false);
            } else {    //If the player is not local
                //Sets all events in onToggleRemote to false
                onToggleRemote.Invoke (false);
            }
        }

        //Enables the player
        void EnablePlayer(){
            //If the player is the local player
            if (isLocalPlayer) {
                //Initalizes the canvas
                PlayerCanvas.canvas.Initialize ();
                //disables the main camera
                mainCamera.SetActive (false);
                //Calls the SwitchMaterial passing in true
                candyCaneSwitcher.SwitchMaterial(true);
            }

            //Sets all events in onToggleShared to true
            onToggleShared.Invoke (true);

            //If the player is local
            if (isLocalPlayer) {
                //Sets all events in onToggleLocal to true
                onToggleLocal.Invoke (true);
            } else {    //If the player is not local
                //Sets all events in onToggleRemote to true
                onToggleRemote.Invoke (true);
            }
        }

        //Occurs when the player dies
        public void Die(){
            //If the player is local or doesn't have a playerControllerId
            if (isLocalPlayer || playerControllerId == -1) {
                //Sets Died animation trigger
                //anim.SetTrigger ("Died");
            }
            //If the player is the local player
            if(isLocalPlayer){
                //Writes game status text saying "You Died" and plays the death audio
                PlayerCanvas.canvas.WriteGameStatusText("You Died!");
                PlayerCanvas.canvas.PlayDeathAudio ();
            }
            //Disables the player
            DisablePlayer ();
            //Invokes the Respawn function after respawnTime has passed
            Invoke ("Respawn", respawnTime);
        }

        //Respawns the player
        void Respawn(){
            //If the player is local or doesn't have a playerControllerId
            if (isLocalPlayer || playerControllerId == -1) {
                //Sets Restart animation trigger
                //anim.SetTrigger ("Restart");
            }

            //If the player is the local player
            if (isLocalPlayer) {
                //Sets a spawn location based on the start positions in Network manager
                Transform spawn = NetworkManager.singleton.GetStartPosition ();

                //Sets the transform position and rotation to equal spawn position and rotation
                transform.position = spawn.position;
                transform.rotation = spawn.rotation;
            }

            //Enables the player
            EnablePlayer ();
        }

        void OnNameChanged(string value){
            //Changes playerName to the value
            playerName = value;

            //Changes the game object name to playerName
            gameObject.name = playerName;

            //Gets the Text component and changes the text to playerName. Passes in true in order to search for a deactivated object.
            GetComponentInChildren<Text> (true).text = playerName;
        }

        void OnColorChanged(Color value){
            //Changes the player color to the value
            playerColor = value;
            //Changes the color of the player through the renderer toggler script
            GetComponentInChildren<RendererToggler> ().ChangeColor (playerColor);
        }

        [Server]//Function can only be run on a server
        //Occurs when a player won
        public void Won(){
            //Loops through all of the players and calls RpcGameOver passing in netID and name
            for (int i = 0; i < players.Count; i++) {
                players [i].RpcGameOver (netId, name);
            }

            //Go back to Lobby after 5 seconds
            Invoke("BackToLobby", 5f);
        }

        [ClientRpc]//Function is invoked on clients from a server
        //Shows who won based on NetworkID and player name
        void RpcGameOver(NetworkInstanceId networkID, string name){
            //Disables the player
            DisablePlayer();

            //Displays the mouse and allows you to move the cursor
            Cursor.lockState = CursorLockMode.None;
            Cursor.visible = true;

            //If the player is local
            if (isLocalPlayer) {
                //If netID is equal to networkID
                if (netId == networkID) {
                    //Updates the Game status text to You Won!
                    PlayerCanvas.canvas.WriteGameStatusText ("You Won!");
                } else {    //Otherwise
                    //Updates the Game status text to Game Over
                    PlayerCanvas.canvas.WriteGameStatusText ("Game Over!\n" + name + " Won");
                }
            }
        }

        //Returns to the Lobby
        void BackToLobby(){
            //Finds the NetworkLobbyManager and returns to the lobby
            FindObjectOfType<NetworkLobbyManager> ().SendReturnToLobby ();
        }

    }

Thanks, @Mike-Geig !! So that’s what they meant in https://forum.unity3d.com/threads/forcing-unity-to-rebuild-the-project.63996/ and https://forum.unity3d.com/threads/understanding-networkreader-readbyte-out-of-range-errors.361115/ when they said “creating a new build”:

They didn’t mean a build for a new standalone app, they meant rebuilding by recreating the Library folder. Too bad there’s no way to do it within the framework, and we have to delete it manually.

I guess recreating the Library folder solves the [quote=“chrismarch_1, post:4, topic: 605757, username:chrismarch_1”]
mismatch in the number of bytes written and read in an OnSerialze and/or OnDeserialize method
[/quote]

Rebuilding the Library folder also seems to have gotten rid of the sound stuttering. :smile:

Yes, my motherboard is an Asus X99-A. In the beginning of this tutorial, when I used the FirstPersonController script, as well as the Merry Fragmas 2.0 version, I didn’t have this problem though. And when the sound problem appeared, it’s only when the player character is on the ground. During the “jump” mode, the stuttering disappears. After rebuilding /Libraries, the sound problem went away too.