com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

Unable to build on MacOS targeting WebGL.

Open hashamali opened this issue 3 years ago • 1 comments

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: https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/commit/cdca1eb844973e9f314f6a263bb4c0497d9e396f

Additional Context

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

hashamali avatar May 11 '22 23:05 hashamali

Tracked in our backlog MTT-4088

ashwinimurt avatar Jul 12 '22 23:07 ashwinimurt

This should be fixed with https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/2199

UTP support for WebSocket should also be available soon.

jeffreyrainy avatar Sep 19 '22 17:09 jeffreyrainy