using a class from a plugin as public or static won't compile

I want to be able to use the same instance of a class in sevral places
i’ve tried either:

public MyPluginClass;

or as an instance:

public static MyPluginClass Instance();

of course, it doesn’t show any errors, since the code is fine,
but after i build the solution into a Windows Store App, the build won’t compile, with a very underfined error.
if i remove the use of the plugin in a global way, it compiles jsut fine.

anyone can shine some light on this issue and how can i use my class?

Well now when you have posted actual code and error that is the whole different story.
The error is basically the bug with serialization which is done by Unity’s Serialization Weaver.

How to get over it?

  1. Make sure that you use the latest version of Unity, if not try updating.

  2. If step one fails you might want to try Reporting this bug.

  3. If you don’t want to report then try to add [NonSerialized] attribute if you don’t need serialization over there.

  4. If step 3 fails and you still don’t want to report then you might try to overcome it by porting code from your plugin to code and using internal instead of public.

  5. I guess you need to report now ))

I managed to make it work…
now i did a couple of things, i’m not sure if the sum of all parts helped or only one thing.

but i upgraded to latest patch.

than in the plugin, i made a functions that returns a private instance.
now… what i think i missed, was creating the private variable in the fake plugin for the editor!

after that, it compiled!