Problems & Solutions

FAQ

Following are some problems and solutions which were already encountered and (hopefully) fixed.

Web Template Problems

Problems and solutions for problems with the web template:

  • PDF document is not being displayed : Check that the corresponding exercise folder data/exe# contains the dummy index.html file. If it is missing, you can either re-download the web template and use a new version, or copy the index.html file from the /data/exe1/ folder and modify src="exe6.pdf" to correspond to your file name.

WebGL Build Problems

Some browsers have problems with loading of the content - be it from the local Unity web server or the deployed version. I recommend using the Chrome web browser for testing, since it is usually the one least problematic. I will be using Chrome to check your submissions, having the project work on other browsers should be considered optional.

In case of the WebGL Build, the following problems / errors may occur:

  • “both async and sync fetching of the wasm failed” : Try the following setting in the Unity Editor: Edit -> Project Settings -> Player -> WebGL Tab (HTML5 logo) -> Publishing Settings, enable “Decompression Fallback” and set “Compression Format” to “Disabled”.
  • “TypeError: JSEvents.lastGamepadState is null” : No known solution. It only sporadically manifests itself on some versions of the Firefox browser (92, 93, 95).
  • Other Build Failures : Try running the build multiple times. If that doesn’t help then restart Unity, clean the build directory and re-build.
  • Graphical Artifacts, Missing Models, WebGL Errors : Some newer versions of Unity have problems with building the WebGL. The game may even load in the browser and look fine at first. Check your browser’s javascript console for errors and warning such as [.WebGL-<NUMBER>], GL_INVALID_OPERATION, or Mismatch between texture format. In case you find these, it is probably a problem with the newer Unity build system. Temporary fix for this is to revert to older version of Unity. I have tested that everything works fine using Unity 2021.2.0, which can be downloaded from the Unity download archive.

Miscellaneous Unity Problems

These are some of the various problems you might encounter during standard operating procedure with Unity.

  • Assets fail to import : Try disabling your antivirus software for a moment and reload the assets with Control + R.
  • Packages fail to install / Problems with missing type or namespace : There may be problem with the location of your project. Especially if you are using Windows, the C: drive has different permission rules. Another problem may be that the paths Unity generates are too long (>=260 characters). Try placing the project to some other drive. If that is not an option, try creating your project directory (e.g., GameDev) in the root of your C: drive.