Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is there a way of making a certain package version permanent?

Discussion in 'General Discussion' started by bobueland, May 24, 2020.

  1. bobueland

    bobueland

    Joined:
    Sep 27, 2019
    Posts:
    19
    Screen Shot 2020-05-24 at 6.42.16 PM.png

    Each time I open a new project I get by default Visual Studio Code package 1.2.0. But that one has problems with IntelliSense. So I manually change to Visual Studio Code Editor 1.1.2 which works with IntelliSense. But I would like to avoid doing that each time I make a new project. Can it be avoided?
     
    Last edited: May 25, 2020
  2. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    Just a thought, but I wonder if it's possible to make your own project templates?

    In the same way there are "3D" and "3D With Extras" templates on the Unity Hub, it would be good if it was possible to make your own with whatever packages you wanted to include.

    But I've no idea whether that's already possible or not.
     
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    There isn't, but that's been a requested feature by me and a couple others.
     
    CityGen3D likes this.
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    upload_2020-5-25_19-27-29.png
     
    CityGen3D likes this.
  5. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    Looking into it, apparently this is the process and... uh...

    Maybe it needs a bit of UX work.

     
    CityGen3D, MadeFromPolygons and Ryiah like this.
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    Choose the base template that you want everything to be built around and extract it into a folder somewhere. From there open
    package.json
    contained within the base folder of the template files and change
    name
    to a unique identifier for your organization and
    displayName
    to a the text you want visible in Unity Hub. Once you're done save and close the file.

    Open
    manifest.json
    stored under
    ProjectData~\Packages
    . Add any custom packages by name and version. Just as an example if you wanted v2.0.1 of the Google VR package for iOS you'd add
    "com.unity.xr.googlevr.ios": "2.0.1"
    Once you're done save and close the file.

    Finally we need to recompress everything. With 7-zip (or equivalent tool supporting tar) create a tar of the base folder and all of its contents into a file named after the unique identifier you specified in
    package.json
    . Once you've created it you need to gzip the tar. Once you've recompressed it move the file into the projects template folder appropriate to the location of your editor and version. I screenshotted the location of mine because ICODE can't handle the full length properly.

    upload_2020-5-25_19-52-50.png

    Thanks for letting me know there is a way to do it within the editor.
     
    Last edited: May 26, 2020
    CityGen3D likes this.