How can I use assembly definition files in Fusion?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How can I use assembly definition files in Fusion?

torisoup
2022-09-04 06:57:18

[Asking questions]

  • How can I use assembly definition files in Fusion?

  • I manage my own code by defining asmdef.

  • However, the Fusion code belongs to Assembly-CSharp, so it is not accessible as it is.

I tried defining Photon/Fusion/Scripts/Fusion.asmdef , but in that case I get this error at runtime.

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

Comments

torisoup
2022-09-04 10:53:34

Sorry, I mistakenly thought this method would not work because the error did not disappear after adding it to NetworkProjectConfig.

To be accurate, after adding it to NetworkProjectConfig, I had to explicitly add the NetworkSceneManagerDefault or else I would have received an error.

So it has been resolved. Sorry for the trouble.

Vivraan
2023-01-29 19:44:37

Sorry to necro this thread but I am trying the same thing and getting errors from scripts under Prototyping.

EDIT: Add Fusion.Editor as an .asmdef reference.

Back to top