Compilation error when calling a C# from a Unityscript (js) in Unity3d

Hello to all. I need a little help to make a call of a C# through a js script in Unity3d. The script I’d like to call is named “IsometricBheaviour.cs” and it is placed in Asset/Plugins folder.

This is the coding of the “IsometricBheaviour.cs” script:

using UnityEngine;
using System.Collections;

public class IsometricBheaviour : MonoBehaviour {

    private static bool mIsRotated = false;
    private static bool mMustRotate = false;
    private GameObject whatever;    
        
    // Use this for initialization
    void Start () 
    {
        whatever = GameObject.Find ("MarkerObject");
    }
     
    // Update is called once per frame
    void Update () 
    {
    // Update is called once per frame
    }
        void Isometric ()
        {
        if (mMustRotate  !mIsRotated) 
        {
            //Rotate all models 45 degrees around X
            if (whatever != null) {
                GameObject modelUnderChipsTrackable = whatever.transform.GetChild(0).gameObject;
                modelUnderChipsTrackable.transform.RotateAround(new Vector3(1,0,0), Mathf.PI/3);
                 
                }
            mIsRotated = true;
            mMustRotate = false;
        

            {
              if (!mIsRotated) 
                {
                mMustRotate = true;
                }
    }
}
    }
}

The javascript that I want to use to call the “IsometricBheaviour.cs” script is basically a GUI controller script, with some buttons.
Here is the coding for calling the C# script:

#pragma strict
    var native_width :  float = 480;
    var native_height : float = 320;
    var ctrlImage : Texture2D;
    var txtImage : Texture2D;
    var btnTexture1 : Texture;
    var btnTexture2 : ........... ;
    var btnTexture3 : ........... ;


    function Start() {
   }
    
    function Update() {
    }
    

    function OnGUI ()
    {
        //set up scaling
        var rx : float = Screen.width / native_width;
        var ry : float = Screen.height / native_height;
     
        GUI.matrix = Matrix4x4.TRS (Vector3(0, 0, 0), Quaternion.identity, Vector3 (rx, ry, 1));
     
        //now create your GUI normally, as if you were in your native resolution
        //The GUI.matrix will scale everything automatically.
     
        GUI.Box( Rect(10, 100, 420, 120) ,ctrlImage, "");
     
        if (!btnTexture1)
            {
            Debug.LogError("Please assign a texture on the inspector");
            return;
            }
     
        if(GUI.Button(Rect(40, 134 50, 30), btnTexture1));
          var runScript1 : GameObject[] = GameObject.FindGameObjectsWithTag("markerObject");     
            for(var doIsometric : GameObject in runScript1) 
               {     
             var script1 : IsometricBheaviour = doIsometric.GetComponent(IsometricBheaviour);     
             if(script1) 
             {
              IsometricBheaviour.doIsometric();
             }     
            }

I cannot make it compile. I get the following error:

" Error BCE0018: The name ‘IsometricBheaviour’ does not denote a valid type (‘not found’). Did you mean ‘System.Net.Sockets.IOControlCode’? (BCE001 (Assembly-UnityScript-firstpass)"

Can someone help me, make this javascript work? I am new to Unity and programming and I got stuck on this big time now.
I have placed the C# in plugins folder as mentioned here http://answers.unity3d.com/questions/12248/i-need-to-call-a-c-function-from-javascript.html and here https://docs.unity3d.com/Documentation/Manual/ScriptCompileOrderFolders.html

Still I get no compilation. Thank you all for your time, reading this post. Any advice, is very much welcomed.

The folder needs to be called Plugins.

Hello @Graham Dunnett. Thanks for your time reading my question. I’ve made a typo in my post. The folder is indeed named Plugins. I will edit the post asap. Though the folder name is correct, do you think there is something wrong with the coding, and I get such an error on compilation?

I’ve copied your code into a project, fixed the errors (missing Texture on btnTexture2 and 3, missing comma at line 73, missing closing brace) but got something to work. When the compiler is compiling your JS script, it seems to not know anything about your IsometricBheaviour class, which can only mean it’s failed to compile the IsometricBheaviour.cs script. I think the results of the compile get written into Library/ScriptAssemblies, with the csharp ending up in Assembly-CSharp-firstpass.dll, might be worth checking that you have this file.

Thank you @Graham Dunnett for your time and efford fixing those errors in code. Because I am a noob to programming and Unity, could you explain in detail how should I use the “Library/ScriptAssemblies, with the csharp ending up in Assembly-CSharp-firstpass.dll”, that you mentioned in your answer?

I understand that compliler, is looking for the C# script, cause it couldn’t find it, right? The script is at Assets/Plugins folder, so what should I fix to the coding to make it compile and how should I call the “IsometricBheaviour.cs” C# script, through the js?