Closed
Description
I'm attempting to setup a PlayMode Unit Test using Test Runner.
UPDATE: Downgrading to Unity 2019 resolves.
Describe the bug
Field `MLAPI.NetworkManager:__ntable' is inaccessible from a Unity Assembly Definition
To Reproduce
In a simple scene using MLAPI with a NetworkManager and a NetworkObject -
- Open Test Runner
- Create a PlayMode Test Assembly Folder
- Create Test Script in current Folder
- From the Project window, Create a Assembly Definition, name it "Scripts"
- On the new "Scripts" Assembly definition Add com,unity.multiplayer.mlapi.runtime as a Assembly Definition Reference
- Run, you'll then get the error -
FieldAccessException: FieldMLAPI.NetworkManager:__ntable' is inaccessible from method
xxxx.xxxx:.cctor ()'
Rethrow as TypeInitializationException: The type initializer for 'xxxx.xxxx' threw an exception.
Deleting the "Scripts" Assembly Definition returns things to working order.
Environment (please complete the following information):
- OS: Windows 10
- Unity Version: 2020.3.2.f1
- MLAPI Version: 0.1.0
- MLAPI Commit: