Use function from another script.

After drawing a blank in the referance guide,

I have a few scripts that I want to access from multiple javascripts.

Some are c# and others javascript. They are NOT attached to any object.

Is it possible to access functions within these scripts, and how should it be done?

It is possible to use both languages, but you need to place them in specific folders within your project, then the way they compile means that they only work one way i.e. C# gets compiled before JS, JS can see C# but C# cannot see JS. Read this link, especially Point 3 :

=> point 3 … This allows you to let different scripting languages interoperate. For example, if you want to create a Javascript that uses a C# script: place the C# script in the “Standard Assets” folder and the Javascript outside of the “Standard Assets” folder. The Javascript can now reference the C# script directly.

However, it would be more prudent of you to convert the scripts and use just one language, eg choose C# or uJS for your project. Then you will never have the problem of one language not being able to see the other. Also if you convert the scripts, you will actually learn how to read both uJS and C# !

Here’s some links I found useful in converting between C# and uJS :

(from my answer here : how to connect 2 scripts using C# / JS - Questions & Answers - Unity Discussions)

Hi Inorder to call a function it has to be attached to an object You can call a function from java to C# by placing C# in Standard Assets folder and Vice versa