Troubleshooting

From Pearhub Wiki
Jump to navigation Jump to search

If you have a problem, check this page to see if it has already been solved.

Also, if you come across a problem that isn't listed here, consider adding it after you solved it, if you believe others may run into the same problem.

Compile Errors

Assets/Scripts/CompanyMap/Networking/GameServer.cs(63,42): error CS0103: The name 'HttpUtility' does not exist in the current context

This is likely because you are targeting a platform other than WebGL.

To solve this, open the 'Build Settings'-window (File/Build Settings) select the 'WebGL'-platform and press 'Switch Platform', then wait for the project to recompile.

If the problem persists, navigate to Project Settings (Edit/Project Settings), then under 'Player/Other Settings', set the 'API Compatibility Level' to '.Net Standard 2.1' and close the window. You may need to restart Unity.

Misc

Database not loading properly

This can happen when there are *.json files in the db folder, but they are malformed, corrupted, or data is missing (for example, if there was an update adding the player's favorite color to the database, but the database that's being loaded doesn't have that information).

It usually manifests as a runtime error as soon as you start the server.

To solve this, write some kind of update method that updates the database for that specific case, or, if you haven't added any functionality, it's possible that the database got corrupted. If this is the case, notify whoever is responsible for the databases (probably Steven) and make him help you. If you are in a hurry, copy the 'db' folder to a safe location. Then delete the original 'db' folder and it will regenerate itself automatically (though of the previous data will be lost).