Skip to content

Unable to build on MacOS targeting WebGL. #1962

@hashamali

Description

@hashamali

Description

I added this Netcode package to an empty project targeting WebGL on MacOS platform. I realize that the default transport, UTP, does not work on WebGL. I am planning on using a WebSocket based community transport. However, this should not prevent compilation. Upon loading the package, I see several of the following error:

(0,0): error System.TypeLoadException: Could not load type 'Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle' from assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

Reproduce Steps

  1. Ensure you're on MacOS.
  2. Import package into an empty Unity project.
  3. Target WebGL.

Alternatively, simply load the attached sample project below on a MacOS device.

Actual Outcome

Several errors listed, all the same error:

(0,0): error System.TypeLoadException: Could not load type 'Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle' from assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

Expected Outcome

Project can be built without errors.

Environment

  • OS: MacOS Big Sur 11.6.4
  • Unity Version: 2021.2.18f1
  • Netcode Version: 1.0.0-pre.9
  • Netcode Commit: cdca1eb

Additional Context

See sample project: https://drive.google.com/file/d/1n_Z8w-dv49oTu8I-j8XJloeNmfhi7ZJ-/view?usp=sharing

Metadata

Metadata

Assignees

Labels

priority:highThis issue has high priority and we are focusing to resolve itstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions