0
Answered

AoT Pre-Build not working with the Command attribute.

Marshall Brooks 3 years ago updated 3 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.


Thanks

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

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!

+1

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.