Unity-Technologies/com.unity.multiplayer.samples.coop

[Build error] When I attempt to build for Android, getting networkvariable error

victorcfk opened this issue · 5 comments

Describe the bug
When I attempt to make an Android Build, I receive a Unresolved inflated type argument for 'T' with declaring type 'Unity.Netcode.NetworkVariable`1' error. Full error below in context

To Reproduce
Steps to reproduce the behavior:

  1. Open the co-op sample project
  2. Change platform to Android
  3. Choose build and run
  4. Build fails
  5. See error

Expected behavior
Build succeeds, apk generated, sent to device

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2021.3.8f1
  • BossRoom Version: commit at 6e1ee7a

Additional context

  • Unity for netcode is included in the project's package correctly
  • Unity Editor version of the project is working correctly
  • Detailed Unity build error, occurs 3 times each for the OnValueChangedDelegate. Double clicking does not bring me to the correct line in file
    Field 'Unity.Netcode.NetworkVariable1/OnValueChangedDelegate<T> Unity.Netcode.NetworkVariable1::OnValueChanged' from 'C:\Users\victorchua\Documents\GitHub\com.unity.multiplayer.samples.coop\Library\ScriptAssemblies\Unity.Netcode.Runtime.dll', exception Unresolved inflated type argument for 'T' with declaring type 'Unity.Netcode.NetworkVariable`1'
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

Field 'T Unity.Netcode.NetworkVariable1::m_InternalValue' from 'C:\Users\victorchua\Documents\GitHub\com.unity.multiplayer.samples.coop\Library\ScriptAssemblies\Unity.Netcode.Runtime.dll', exception Unresolved inflated type argument for 'T' with declaring type 'Unity.Netcode.NetworkVariable1'
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

Error building Player: 7 errors

@victorcfk I just tested with 2021.3.8f1 and 2021.3.10f1. Issue seems to be in your editor version, I could repro with 8f1 and not 10f1.

Actually, nevermind, just realized I missed the compile error since it's still building the apk. investigating

Fixed in 2021.3.11f1 here https://issuetracker.unity3d.com/issues/exception-for-unresolved-inflated-type-arguments
Tested with 12f1 and am not getting the issue. Will create a patch release bumping BR version to 12f1.

Creating hotfix for this, should be up soon. @victorcfk thanks for the details by the way :) very thorough ticket

Thanks for addressing this so quickly @SamuelBellomo !