2
\$\begingroup\$

I want my players to be able to create their own scenes as custom levels, save them as files (say custom1.gamelevel), and open them directly in my game program by double-clicking the level file, rather than having to go through the steps of opening the game, browsing to the file in my menus, and then loading that scene/level.

I already have loading custom levels covered. I just need a way to associate this custom file type with my game which can open it.

I am mainly interested in a Windows-based solution.

How can I do this?

\$\endgroup\$
  • \$\begingroup\$ Hmm, would a combination of this and this do the trick? (I did not try it. I hope it is a starting point for you.) \$\endgroup\$ – Alexandre Vaillancourt Oct 26 '15 at 20:34
  • \$\begingroup\$ Thanks I'll look at these and see what I can come up with. \$\endgroup\$ – Miguet Schwab Oct 28 '15 at 19:13
2
\$\begingroup\$

This isn't explicitly a problem of Unity. This is something an installer could do for your programm.

Summed up: it is a registry setting

Hope this link helps:

where-in-the-registry-does-windows-store-with-which-program-to-open-certain-files @ superuser

Code samples on microsoft social network

MSDN

\$\endgroup\$
  • \$\begingroup\$ Thanks I was thinking this might be the direction I'd have to take. I'll look over the links you've posted here and give it a shot. \$\endgroup\$ – Miguet Schwab Oct 28 '15 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.