Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How do I create a Windows application with certain files and certain directories?

Discussion in 'Windows' started by Must_I_have_a_name, Oct 7, 2022.

  1. Must_I_have_a_name

    Must_I_have_a_name

    Joined:
    Dec 27, 2016
    Posts:
    11
    I have been unable to find a good description of what I need to do anywhere so I thought I'd try asking here. I'm trying to submit a version of my Unity app to the Microsoft Windows store. I can basically generate it in either a non-UWP form or a UWP form. I haven't had much luck getting the Developer site to accept my non-UWP package however (that's another problem). In either case, I need to cause an installed version of the users computer to have all the normal files and directories for a Unity program AND one text file and 3 directories. One of those directories is empty and one of them contain jpegs and the 3rd contains text files. Here's the question how do I create a package file which when spun out to full form causes that one file and 3 directories to exist in the install directory that has the .vcxproj file (for the non-UWP form). Or if I could just know where the directory is that contains my file and directories. I have tried creating a visual studio project and copying in my files and 3 directories and marking them as "included in project" with mixed results. For some weird reason only 1 of the directories winds up in the Assets directory and the other 2 marked directories don't show up in the generated structure. Thanks for any help you might give me. I'm using community VS 2019. I don't care what I wind up with, UWP or non-UWP.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,626
  3. Must_I_have_a_name

    Must_I_have_a_name

    Joined:
    Dec 27, 2016
    Posts:
    11
    Thanks for your reply. I tried that and I do see my file and my directories show up in the Windows build. I think I always shied away from using that because the warning in the docs about these shared assets winding up being read only. But I only care about the Windows install now and my best guess is that that will be read/write so this result looks good.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,626
    Them being read only stems from the fact that these files will be part of your game package/install. Generally, it's a good idea to treat those files as read-only, even if they might not be. For instance, if you install your app/game to Program Files, they WILL be read-only because you need to use elevated privileges to change the files there.