question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compile / Code Gen Error: Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP: (0,0)

See original GitHub issue

Description

On Unity 2022.2.0a12, Latest version of NGO (hash: 6d54e2878bc80b92f32a618473162763b56b38ce), the package fails to compile.

I feel this is related to https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/1920 , I tried with different versions of the Mono.Cecil package with no luck (1.10.1 through 1.11.4).

Reproduce Steps

  1. Install Unity 2022.2.0a12.
  2. Install Netcode for GameObjects via git
  3. Notice compile error after compilation finishes

Actual Outcome

Unity prints the error Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP: (0,0): error - System.InvalidCastException: Unable to cast object of type 'Mono.Cecil.ArrayType' to type 'Mono.Cecil.GenericInstanceType'.|| at Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP.ResolveGenericType(TypeReference type, List1 typeStack)|| at Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP.Process(ICompiledAssembly compiledAssembly) at Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP.ResolveGenericType(TypeReference type, List1 typeStack)|| at Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP.Process(ICompiledAssembly compiledAssembly)

Expected Outcome

The project should compile

Environment

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ashwinimurtcommented, Jul 12, 2022

Tracked in our backlog MTT-4087

1reaction
mickjmasoncommented, Jun 6, 2022

Also having an issue with pre-9. This repo by Dilmer works on pre-3 but fails on pre-9. https://github.com/dilmerv/UnityMultiplayerPlayground With this error: (0,0): error - System.NullReferenceException: Object reference not set to an instance of an object.|| at Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP.Process(ICompiledAssembly compiledAssembly) in D:\repos\bombbomb\Library\PackageCache\com.unity.netcode.gameobjects@1.0.0-pre.9\Editor\CodeGen\INetworkSerializableILPP.cs:line 116 at Unity.Netcode.Editor.CodeGen.INetworkSerializableILPP.Process(ICompiledAssembly compiledAssembly) in D:\repos\bombbomb\Library\PackageCache\com.unity.netcode.gameobjects@1.0.0-pre.9\Editor\CodeGen\INetworkSerializableILPP.cs:line 116

Read more comments on GitHub >

github_iconTop Results From Across the Web

(0,0): error - System.NullReferenceException: Object ...
(0,0): error - System.NullReferenceException: Object reference not set to an instance of an object.| at Unity.Netcode.Editor.CodeGen.
Read more >
Changelog | Netcode for GameObjects | 1.5.2
Added a new OnTransportFailure callback to NetworkManager . This callback is invoked when the manager's NetworkTransport encounters an unrecoverable error.
Read more >
Experience with basic Code Generation in Unity? : r/Unity3D
Hi there, I looked a bit at Roslyn and other rather general and complex approaches to codegen. Q: Do you have any experience...
Read more >
Changelog | Netcode for Entities | 1.0.15
Compilation errors may be present if you remove the folder after the upgrade. If your project was customizing the code-generation by using Modifiers...
Read more >
Incorporate Unity with Source Generator - Unity does not ...
I am able to build a source generator and put the resulting analyzer in Unity, my IDE is able to pick up the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found