[SOLVED]...is not a member of...

I’m getting an error because Unity is looking for letterManager.temp as apposed to letterManager.letter_a. How can I cast this string as an object call to lookup a GameObject from another class? Thanks!

private var letterManager : LetterManager;

function Awake()
{
	currentLetter="a";
	var temp : String= "letter_"+currentLetter;	
	go = letterManager.temp;
}

Unfortunately, you can’t do this kind of thing in Unity’s version of JavaScript because it is compiled - this type of trick relies on an interpreter.

However, you can do roughly the same type of thing using a Hashtable. (Traditional JS interpreters actually implement objects using a hash table internally.)

Thank you very much andeeee, exactly what I needed!