Accessing script on level load

Hi Unity Community

I am trying to access a script from a gameobject when loading a level (hence not able to assign in inspector) and keep getting null references thrown at me; I have used the go.find().getcomponent() method numerous times and never encountered an issue so I am kind of stumped as to why this is occurring?

Have tried a number of different formulations for accessing the script but to no avail, can anyone provide me any pointers as to where I am going wrong? [Scripting in uJS]

Many thanks in advance,

Ryan

Script To Access:

Current Code:

var rayDetectScript : BrowseRayDetectObj;
var browseXml : BrowseContextInfoXml;

function editViewInfo()
{
	var curObj : GameObject = rayDetectScript.curObj;
	loadImportCurObj(curObj);
}

function loadImportCurObj(curObj : GameObject){

	//used to load import scene to view full info of selected browse obj
	//cur obj needs to persist between scenes
	Application.LoadLevel("MetaPipe_ImportScene");
	DontDestroyOnLoad(curObj);
	curObj.tag = "Current Model";
	curObj.transform.position = Vector3(0, 0, 0);
	var gameController = GameObject.Find("GameController");
	//var infoCont : ObjInfoControl = gameController.GetComponent.<ObjInfoControl>();
	//var infoCont : ObjInfoControl = gameController.GetComponent("Obj Info Control");
	var infoCont : ObjInfoControl = gameController.GetComponent(ObjInfoControl);
	infoCont.fileName = browseXml.fileName;
	infoCont.Load();
}

The infoCont is a component on a gameobject in the scene being loaded; I don’t know if it possible to find a gameobject on a new scene on load (which is what I was trying to do).

So I have made the gamecontroller a singleton and chucked it in both scenes and now all is good. Cheers!