Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by RKS324 · Dec 04, 2011 at 02:20 AM · errorbce0018

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Persona · Dec 04, 2011 at 03:48 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image syclamoth · Dec 04, 2011 at 03:53 AM 0
Share

No, it's obviously an m_plug. Which the C# script doesn't know about.

avatar image
0

Answer by syclamoth · Dec 04, 2011 at 03:54 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by aldonaletto · Dec 04, 2011 at 11:32 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image RKS324 · Dec 05, 2011 at 12:55 AM 0
Share

Thank for your help. I inserted my CS scripts in Assets/Pro Standard Assets and put my JS Scripts in Assets/Scripts, But the error doesn't disappear. The error is the same. The name 'm_plug' does not denote a valid type ('not found'). Did you mean 'UnityEngine.$$anonymous$$issingReferenceException'?. m_plug was defined in Assets/Scripts/GlobalPlay.js such as .

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Editing the jumppad from the 3rd person tutorial 2 Answers

Missing Script? 1 Answer

Error BCE0018 0 Answers

disabling a script when collide with a cube 3 Answers

how do I fix following errors? help please 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges