Javascript object in C# class

How can we make a javascript file object in a C# class. I have tried like this.

using UnityEngine;
using System.Collections;

public class MyCSharpClassName : MonoBehaviour
{
       MyJavaSctipt Obj;
}

it gives the following error

Assets/Scripts/MyCSharpClassName.cs(15,9): error CS0246: The type or namespace name `MyJavaSctipt’ could not be found. Are you missing a using directive or an assembly reference?

I have tried by inheriting the MyJavaScript but it gives same error :frowning:

Anything I am doing wrong.

thanks in advance
unityboy

You need to make sure the js file is compiled before the C# file. More information here:

On the bottom of the page, the solution to your problem is discussed.

Hi,
direct calling of JS from C# (C#->JS) is currently not supported by Unity iPhone. Reverse call direction (JS->C#) works fine.