FAQ
Here are answers to some common issues when using multiplayer in Experiences.
Troubleshooting Tips
Here are a couple tips to try if you run into any errors:
- Restart Unity
- Check the ExperienceInfo.json file has your development keys
- Check the Multiplayer window for any necessary updates from the server
- Check the Console window and Remote Server Logs if applicable
- Check if the Server terminal is even running (see how below)
Frequently Asked Questions
Here are some common questions that arise when developing multiplayer Experiences.
Why is my Avatar not loading in a new project?
For new projects, the NetworkManager prefab will get replaced by a new one without any saved references which causes all logic to stop working. This requires the NetworkManager to be prioritized in the script execution.
To fix it:
- Open the Project Settings window under the Edit menu dropdown
- Open the Script Execution Order section on the left-side
- Press the "+" button near the bottom to add another option
- Select the
Genies.Components.Sdk.External.Multiplayer.Network Manager
option - Move the NetworkManager option to the 4th top position
- Click Apply at the bottom
- Restart Unity Play mode and it should work
Is my server process running?
The Smart Fox Server process sometimes is not running which you can check by searching your Activity Monitor or Task Manager for any sfs
processes. It's possible the server Terminal window is not visible but the server process is running in the background.
How can I start my server process manually?
To manually start the server process, open the C:\Users\username\SmartFoxServer_2X\SFS2X folder and launch the sfs2x-standalone.exe file which opens a server Terminal window.
Why is the Update Server Libraries button broken?
The Update Server Libraries button in the Multiplayer window will not work if the server process is running. It will show an error in the Console that looks like this:
To fix it:
- Open your Activity Monitor or Task Manager and quit all
sfs
processes - Try clicking the Update Server Libraries button again
- Once updated, launch the
sfs2x-standalone.exe
app in theC:\Users\...\SmartFoxServer_2X\SFS2X
folder to restart the server
Why is my server modules not working?
When adding custom server modules, the server code may not automatically update and show an error in the server Terminal window like so:
To fix it:
- Open a new Terminal window
- Navigate to your Server directory in the root Unity project folder
- For example:
cd "C:\Users\...\Documents\NewProject\Server"
- For example:
- Type this command:
npm run build
- Restart Unity Play mode and it should work
Why does an error mention Node.js version when setting up server code?
The server setup requires a specific Node.js version. If it is not installed or using a lower version, you may see this console error when pressing the Setup Server Code button:
To fix it, follow the steps in the Node.js documentation: https://nodejs.org/en
Why does my Smart Fox Server not launch?
When trying to manually launch the Smart Fox Server terminal by clicking the sfs2x-standalone.exe file in the Users/user/SmartFoxServer_2X/SFS2X folder, you may not see the terminal open. This could be an issue cause by not having the correct Java libraries.
You can see this error by trying to launch the file in the Terminal:
To fix it, install Temerin 11 JDK.