- Home /
Unable to access functions in java script from C# script
Hi, I can't access functions from C# script in to my java scripts. :(
plz help
hello, what problems are you having? Have you put your c# script in Plugins or Stadard Assets folder?
Also, you need to create a new variable (in javascript) with the type of class of c# in order to access the c# "functions"
Actually I am using GameAnalytics in my old project and its most of the scripts are java scripts so for to use the function of GameAnalytics I put that GameAnalytics folder in standard Assets then only I was able to access the function of GameAnalytics in my C# script but again my old java scripts are also in Standard Assets so I am unable to access that C# script in my Java script because both are in StandardAssets. So is there any solution for this?
I haven't run into that situation, my guess is that the culprit is the compile order:
http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder
So maybe you can move your js to Plugins or something?
Answer by Tiggster · Dec 24, 2013 at 05:38 PM
You would be better off using all C# or JS instead of a combination of both. IMO C# is probably your better option. No reason to over-complicate things by trying to use multiple languages.
Your answer

Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
shooting scripts 0 Answers
How to access hinge joint variables 3 Answers
Problems with scripts 0 Answers