Sites

Menu

Troubleshooting

Note: We also maintain a known issues page for any open bugs in the SpatialOS GDK for Unity.


Errors

Could not discover location for dotnet.exe

Cause

Either you don’t have the .NET Core SDK (x64) installed or the directory containing the dotnet executable is not in your PATH.

Fix

  1. Ensure that you have the correct version of .NET Core SDK (x64)(Microsoft documentation) installed. Our supported versions are listed on the setup page).
  2. Ensure that the dotnet executable is added to your PATH environment variable.
  3. Restart your computer after making the above changes.


Exceptions

Runtime\bcl.exe did not run properly

Cause

This is a benign exception that is thrown when cross compiling a worker while burst compilation is turned on. Your worker was successfully built despite this error.

This occurs because Unity’s burst compiler doesn’t yet fully support cross compilation (Windows to Linux, for example).

Fix

To remove the error message, disable burst compilation by unchecking Jobs > Enable Burst Compilation in your Unity Editor.


Problems

A Reader/Writer or CommandSender/Receiver in my code is null

This can be caused by one of multiple problems. Please check the list below for possible fixes:

  • Ensure that your field is declared in a MonoBehaviour. They are not supported in ECS systems.
  • Ensure that the field is decorated with a [Require] attribute.
  • Ensure that the GameObject containing your MonoBehaviour is associated with a SpatialOS entity.
    • You can verify this by examining whether a LinkedEntityComponent is attached to the GameObject after it is created at runtime.
  • Ensure that you only access Requirables in a MonoBehaviour while the MonoBehaviour is enabled. Requirables are supposed to be null while the MonoBehaviour is disabled.

Note: certain Unity event methods like OnTriggerEnter or OnCollisionEnter may be invoked, even if a MonoBehaviour is disabled.

A MonoBehaviour containing fields with the Require attribute is disabled when I expect it to be enabled

This can be caused by one of multiple problems. Please check the list below for possible fixes:

  • Ensure that GameObjectRepresentationHelper.AddSystems is called when initializing your worker.
  • Ensure that the GameObject containing your MonoBehaviour is associated with a SpatialOS entity.
    • You can verify this by examining whether a LinkedEntityComponent is attached to the GameObject after it is created.
  • Ensure that the requirements for all your fields in your MonoBehaviour are satisfied.
    • You can verify this by examining the SpatialOS entity associated with your GameObject in the SpatialOS Inspector.
    • In the SpatialOS Inspector, ensure that all relevant SpatialOS components are attached to your SpatialOS entity and that read and write access is delegated correctly for your worker.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums