Game Development - How could I pass 'command line arguments' to a Unity standalone build?
<p>Standalone/Client/Exe/Player/Build all refer to the executable the end user will use to run my game.</p>

<p>I'm using Unity as my choice of environment. I'm creating a launcher to start the game. This sounds very redundant, as unity has a "launcher" window, for their standalone builds, but this purpose is to ensure the game is up-to-date by checking for the latest version on a server. I've built the client using a simple WPF application. At this point, I'm trying to think about my various options for making sure the executable for the game is started <strong>only</strong> from the launcher. However, Unity's standalone builds only accept a few range of arguments. Here's what I'm considering:</p>

<ul>
<li>Keep the executable hidden as two separate <em>non executable</em> files that are temporarily combined using <code>copy /b</code> in command line, and outputting as an exe (then deleting after startup). The exe's are no more than 17mb, so it shouldn't take too long.</li>
<li>Find some way to modify the .exe to check for a specific command-line argument to be passed (Unity's runtime doesn't let the developer have access to the arguments after being built. 'Security issues'???)</li>
<li>Create a temp file that stores either a timestamp or some unique identifier that the standalone game will check to make sure it's launched from the launcher (Only problem is throwing an error for Windows to catch that will say 'You must start the game from the launcher.' or something similar)</li>
</ul>

<p>I really want to use this launcher because:</p>

<ul>
<li>It will ensure players' game is updated, so they cannot cheat/exploit</li>
<li>It will allow the game to be installed using a small 5-10mb launcher instead of downloading the whole game</li>
<li>It's cool</li>
</ul>

<p>If you have any other suggestions, or maybe could guide me the right way, let me know. Thank you.</p>