JS to C# not workin

i have a javascrip file where it calls a c# viod
js ‘Server_Menu’

function OnGUI(){
GUI.Box(Rect(x,y,xs,ys),“”,“button”);
GUI.Button(Rect(xb,yb,xbs,ybs),“Make World”);{
CreatePlanet.Create_Planet();
}
}

c# ‘CreatePlanet’

using UnityEngine;
using System.Collections;

public class CreatePlanet : Photon.MonoBehaviour {
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}
	public static void Create_Planet(){
		GameObject RealPlayer = PhotonNetwork.Instantiate( "Camera_Player", new Vector3(Random.Range(-1000, 1000),Random.Range(-1000, 1000),Random.Range(-1000, 1000)), Quaternion.identity, 0 );
	}
}

there both in same folder but it say unknown identifier CreatePlanet
plz help

Mixing multiple script languages tends to cause trouble. Honestly, I recommend sticking to one language if you can. Most professional Unity devs use C# exclusively.

With that said, your problem can be resolved by careful review of the script compilation order manual page.

One script can only reference another script if:

  • Both are in the same language, or…
  • The script being referenced was compiled in an earlier pass (usually “Plugins” or “Standard Assets”).

You may need to move multiple C# scripts into your “Plugins” or “Standard Assets” folders.