You don't usually access other objects by their names (it's possible, but not the recommended way). Usually in Unity you access other objects via references to them. See this chapter in the scripting documentation for details.