Use variabel in other script does not work

hello,
I have a main script in c# where there is a public static string gameNumber;
and a js script where I want to use this variabel
I use this:

if (ConnectMenu.gameNumber == THREE){

then my code ending with }
It used in a function spawn()
now, every time I try to play it says

Unknown identifier: ‘ConnectMenu’.

Does anybody can help me? I realy want this to work

Try to convert ur java script code to c# code and access gamenumber variable from ur converted c# code.

Make sure your C# script with the variable you want to access is placed inside a folder called Plugins inside your assets folder.

Assets >> Plugins >> C# Script

Use getComponent() to access the script if it’s on another GameObject.

getComponent Scripting Reference