I need to start my standalone application with given parameters. Something like :
applicationName -s 1 -e 100 -b 2
Is there any way of doing this ?
asked Mar 30 '10 at 09:29 AM
You should be able to use:
answered Mar 30 '10 at 05:39 PM
Unity's API currently doesn't expose this information for use in scripting (although there are some pre-set command line options which Unity builds respond to).
The only method I've seen suggested (on this forum post) to achieve what you want is to use a C++ plugin, which uses:
which would get the entire command line as a string, and then you'd have to parse the string yourself. I haven't tried this though, so I don't even know whether it actually works.
I also had a quick look on the Unity UserVoice feature request site, to see whether this has already been requested, but I couldn't see any evidence of it. There are a few requests which mention the term "command line", but none seem to be what you want - which I find surprising, since it seems a very useful feature.
Perhaps you could start a new feature request, and post a link to your new request here and to any of the old forum threads which mention this issue too?
answered Mar 30 '10 at 09:59 AM
If you're on OSX, then you can use this as a workaround:
answered May 11 '10 at 05:00 AM