Error: InvalidOperationException: Type ControllerPrototype has not been weaved.



I am trying to create a Dedicated Server using Photon Fusion.

Unity Version is using 2021.2.14f1.

If you select Platform as Windows, Mac, or Linux and run Dedicated Server, the server works well.

However, if you select Platform as Dedicated Server and start the server, the following error message appears.

InvalidOperationException: Type ControllerPrototype has not been weaved. Has the assembly Assembly-CSharp been added to NetworkProjectConfig?

Fusion.NetworkBehaviourUtils.GetWeavedAttributeOrThrow (System.Type type) (at Fusion/Fusion.Runtime/Components/NetworkBehaviourUtils.cs:234)

The same error message appears when running the same test with the HelloFusion example.

This url throws the same error as in your question.

The same error occurs even after applying the solution in the above question.

Do you have any solution?



    I tested again in 2020.3.30f1 version.

    In the 2020.3.30f1 version, it was not possible to select a platform as a Dedicated Server, and Server Build was used to proceed in Headless mode.

    In 2020.3.30f1 version, it worked normally and no error occurred.

    From my point of view, this seems to be a bug that only occurs when Dedicated Server is selected as the platform in the Unity editor 2021.2 version.

    Until this issue is resolved, we plan to proceed with the 2020.3.30f1 version.

    I'd appreciate it if you could let me know if the issue is resolved.

  • ramonmelo

    Hi @ELIOT_VR ,

    We will take a further look and fix it as soon as possible.


    Ramon Melo

    Photon Fusion Team

  • Sudhanshu

    I was facing the same issue. I added FUSION_WEAVER to Player's setting for dedicated server. Now it's working fine.

  • foteini

    I faced the same issue and the problem was that Mono-Cecil package was not installed. The git url should be com.unity.nuget.mono-cecil@1.10.2 and NOT com.unity.nuget.mono-cecil.

    💡 Thanks to @emotitron for providing this answer here :