I am trying to make GameObject.Find() work in batchmode but for some reason it returns a null object.
my code:
public class test: Monobehaviour {
public static GameObject go;
static void doing()
{
go = GameObject.Find ("testing");
}
}
//testing is the name of the gameobject in the editor
I call it from the console on mac using: /Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -projectPath "" -executeMethod test.doing