If you want to add your program to the "Open With" context menu (What you need to do in the installer, add the registry key, pointing to your application, as described here
If you do not have an installer (I think Unity 5 can build you), you can just do it in the game by calling
Microsoft.Win32.Registry.SetValue(key, valueName, value, Microsoft.Win32.RegistryValueKind.String);
with a script inside your scene. Or you can write an installer in C # that does this.)
, , , , . script , 1-, , System.Environment.GetCommandLineArgs(). - , :
string filepath;
string arguments = System.Environment.GetCommandLineArgs();
if (arguments.Length >= 2)
{
filepath = arguments[1];
DoYourThing(filepath);
}
return;
, , 2- , , .