hi all …
i’m trying to call the function changeLightMode() on this script :
@MenuItem (“Component/AssignSkybox”)
static function changeLightMode() {
var sky = Camera.main.GetComponent(Skybox); sky.material=EditorUtility.FindAsset(“Skyboxes/NightSkyboxes/NightSkybox.mat”, Material);
}
… by another script :
function OnGUI () {
if (GUI.Button (Rect (10,10,150,100), “Night Mode”)) {
// calling the function here !
}
}
any help ??