Question by
plagas36 · Nov 12, 2020 at 01:47 PM ·
scripting problemsystemenvironment
Environment Arguments on single instance app
Hey guys, I have a pretty simple question but I can't find the answer.
On windows, I've created a file extension that is link to a Unity app I've made. Let's say file.ext
When I click on my file it opens my app and I can get the file path using this code.
Environment.GetCommandLineArgs();
But my app is single instance. So if I click on another file, let's say file2.ext.
My app is getting focused since it's already open. But how do I get the second file name ?
I know I can use OnApplicationFocus but Environment.GetCommandLineArgs() is not updated.
I would really appreciate some help. Thanks !
Comment
Your answer
Follow this Question
Related Questions
In Game Shop System (Use and Buy Problems) Help!!!!!!!! 0 Answers
Is DateTime working on iOS? 0 Answers
C# suddenly no longer building on Linux 0 Answers