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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Prt0100 · Oct 20, 2013 at 04:11 PM · accessing from any script

Problem accessing C# from Javascript

I realize this question has been asked several times before, but I have tried everything. I am trying to access a C# boolean from a JS Script, but I can't move my C# boolean to the Standard Assets or Plugins folder without breaking my project. I also moved the execution order of the C# script to before the script calling it. I am using the UFPS plugin by visionpunk.

In this screenshot, I have my code on the left and my scene on the right. I successfully tested the boolean calling with a dummy script and it worked, but it was in the Plugins folder, so it was compiled first. In this case, line 181 works (script is in plugins folder) but line 182 does not. Again, I cannot move the script with the boolean. http://puu.sh/4U3UW.jpg

Any help is tremendously appreciated.

Comment
Add comment · Show 1
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 Benproductions1 · Oct 20, 2013 at 10:29 PM 0
Share

Why can't you move the script into a Plugins Folder?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Andrea_Marchetti · May 25, 2017 at 02:57 PM

How did you resolve? I have a package in C# and I am trying to access it from Unityscript files. But I can't move the package folders into Plugins or Standard Assets because the code in the package gives me error, script not found.

Comment
Add comment · Show 2 · 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 Prt0100 · May 25, 2017 at 04:17 PM 0
Share

Can you post some screenshots of your code and more details about your issue, like any console errors you have?

avatar image Andrea_Marchetti Prt0100 · May 25, 2017 at 05:55 PM 0
Share

The error showing up was it didn't find any class named like the one I was trying to access. And if I moved the package's folder into Plugins or Standard Assets then some code in the package was giving me error 'cause it could not find the directory in the original path, and if I remember correctly I could not open the script?... Or maybe I did not try?... Strange...

Anyway, in the end I understood that there was no way to use that plugin (Google Play Services) which was written in C# in a project where everything else was written in Unityscript. So I translated the whole project in C#. I will never have issues like this again. C# from now on.

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

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

I want to build in the resources folder, except for 0 Answers

Trouble with calling a variable from another script 5 Answers

GameObject.name to call script name? 1 Answer

Global data structure accessible by any script? 1 Answer

How to safely manage 100 large JPEGs in a picture viewer app 0 Answers


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