Give help to fix this error

After I add plugin.cs to my project, I couldn’t build my project at all.
Because of this error.

BCE0018: The name ‘m_plug’ does not denote a valid type (‘not found’). Did you mean ‘UnityEngine.MissingReferenceException’?

I defined m_plug in java-script file.

Please give me your help.

Did you define whether it was a gameObject, transform, script, etc?

If you didn’t that was the problem.
You’ll need to post the script for more help though.

The problem here is that you are trying to use a Javascript type in a C# script. Because the two are compiled separately, you can’t use types from one with the other.

Basically this is a good case for picking one language (be it C#, JS or Boo) and sticking with it for everything- the languages aren’t fantastic at communicating with each other.

You can create a folder Assets/Scripts (or the name you prefer), and put your JS scripts there. Unity compiles Assets/Plugins, Assets/Standard Assets and Assets/Pro Standard Assets first, then the Editor subfolders inside them, and finally the scrips stored in other folders - like the Assets/Scripts I suggested. Scripts compiled in the first wave can be “seen” by scripts compiled after, thus the JS scripts will be able to use CS scripts in Plugins - but not the other way around: a script already compiled can’t see the others compiled after.