Not able to add pure Static Class to Bolt by Unit Options Wizard

yyabb 4 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 14

Not able to add pure custom static class to Bolt by Unit Options Wizard->type Options.

Found on: Unity 1.0f3, Bolt.1.2.3, MacOS 10.12.4.


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

Is your class in a seperate assembly or is it just a script in your assets folder?  If the former, you need to add the assembly too in the assembly list I think (previous page to the type options)?

Otherwise could be just the binding options bolt uses for reflection.  You could change your class to be non static and keep the method static, that might allow Bolt to list the type

This is allowed (I tested).  Are there any errors, or is the class in another assembly?

It is just a regular script in my asset folder and I used these extended methods all the time.

If I made this class to non static class,  the class name will show up in the class finder. But I still can not add the static methods from it,  all static methods are not listed under this class name.

The developer of Rewired seems to have issues with one of his types being static too, which stops it from being able to work AOT Safe Mode. It is a bug for sure. Have to wait on Lazlo for this, because you are doing nothing wrong that didn't once work.

Sorry a bit of a long day and didn't really look at the method signature, I just thought it was plain static based on your description - I'm pretty sure there is no support for extended methods.  Anyway, Bolt creates all units in a 'static' fashion as it's visual reflection effectively, so it will always require you to pass a object reference anyway.   Try and remove the 'this' from the first argument (so it is no longer an extension method) and I'm sure it will pick this up fine.  

I did try no-extension static method, still not able to find the method.  Sad.

this works for me:

Which version of bolt you using?  I am using 1.3.0b2 but I'm sure this works fine in 1.2.3

Backup your project and try 1.3.0b2 on a test copy to see if you get the same issue then because if you do then something else is causing it?

Just tried Bolt 1.2.3 for an empty project,  static class still does not work.

Then I tried Bolt 1.3.0 beta, It works!

What time will Bolt 1.3.0 be released  to us?

I'm at GDC at the moment, but it is my priority as soon as I get back next week.