AoT Pre-Build not working with the Command attribute.

Marshall Brooks 4 years ago updated 4 years ago 2

When I run AoT Pre-Build, I get the following errors.

It's only throwing errors on functions with the Command attribute. Everything else works fine.

I'm not sure if it's something I've done wrong, or what, but any input regarding a workaround would be fantastic.


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Hi Marshall,

That's not a mistake on your end. Unity does a pre-compilation step where it changes your code for networking attributes, and that seems to be messing with Bolt's AOT pre-build.

At the moment I see no easy workaround other than creating non-attributed methods that call the attribute-methods. Bolt will have a more complete networking integration in the future, but that's still a little while away!


No worries, I actually fixed it shortly after running into the error. Everything works fine, networked using Bolt, AoT and everything!

What happened was Bolt was showing two types of Cmd funtions in the fuzzy finder, one that I made, and one that I hadn't (Prefixed with Call). Once I switched from the prefixed version to the one I had made, the errors went away.