assign file type to a game?

Hi,

i want to make a mac game with a simple level editor that allows people to write a custom XML file type with my own extension they can share.

Is there a way to register my unity game to open this file type in OS X (and to do this abstract for the user, so when they got the game from the app store, the icons for the level XMLs should change to my defined icon). SO when people double-click the XML someone sent them via e-mail, it should simply open the game and load the level from the file.

Update your applications info.plist and associate with your xml file type.

You can get the command line arguments with System.Environment.GetCommandLineArgs, i assume osx/windows standalone will pass in the full path of the argument(the file).

You may want the first scene to have an awake method/function that checks for the arguments if it has arguments, take action, otherwise load other scene(default).