Question by
andrewsolis · Feb 02, 2016 at 05:40 PM ·
unity 5startplaymode
Unity executeMethod method class cannot be found
Hello,
We're trying to start Unity in Edit Mode (i.e. click the play button ) right when Unity loads up by running a batch file. For some reason however it gives us an error saying the the resulting class could not be found. Our batch file is trying to execute this command:
unity.exe -executeMethod MyUnityScript.start
And throws this error
Class "MyUnityScript" Could not be found
This is what our MyUnityScript looks like:
using Unity Editor;
public class MyUnityScript : MonoBehaviour {
static void start(){
UnityEditor.EditorApplication.ExecuteMenuItem("Edit/Play");
}
}
Any possible knowledge as to why? We'd like to not do it in batch mode since we'd like the user to see what is going on when Unity enters play mode. Any help would be greatly appreciated.
Thanks!
Comment
Your answer
Follow this Question
Related Questions
crash bug 5.5 0 Answers
Countdown Timer 1 Answer
Were do I start with unity5? 2 Answers
Unity 5 Player in air while in play mode 0 Answers
Start function dont work 1 Answer