Search Unity

PackageManager overwites changes the SriptableRenderPipeline

Discussion in 'Package Manager' started by Quatum1000, Sep 6, 2019.

  1. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi,

    (Windows Editor)
    I'd like to make some changes to the SRP in the Unity packages. But PackageManager overwrite all changes on the next Unity start and try to prevent changes to the SRP packages.

    1) Is there any option to prevent overwriting changes are made in a package generally? eg:
    ProjectFolder : \SubScene\Library\PackageCache\com.unity.entities@0.1.1-preview\Unity.Scenes.Hybrid ? Changes are made here reflect the result and will recompiled in unity.

    2) From where are these files in \Library\PackageCache\ overwritten?

    3) If there's no option to prevent overwrite in the package manager, is there any other way to prevent overwriting?

    I need a solution! Thank you!
     
  2. manu73

    manu73

    Unity Technologies

    Joined:
    Aug 22, 2014
    Posts:
    68
    Hi @Quatum1000!

    I think what you want to do is having an embedded version of SRP packages in your project.
    Did you take a look at https://docs.unity3d.com/Manual/CustomPackages.html?

    Also please notice that as soon as you embed (overwrite a package with your own version) you want be able to update it anymore.

    Regards,

    EmmanuelH
     
  3. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    My idea was to create an additional preview package based on entities:
    com.unity.entities@0.1.1-preview.Q1000

    I'v created a sub-folder in Project/packages/ and made a complete copy of the subfolder
    com.unity.entities@0.1.1-preview. Untitled-1.jpg

    and the package.json

    Code (CSharp):
    1. {
    2.   "name": "com.unity.entities",
    3.   "displayName": "Entities",
    4.   "version": "0.1.1-preview.Q1000",
    5.   "unity": "2019.1",
    6.   "unityRelease": "0f1",
    7.   "dependencies": {
    8.     "com.unity.properties": "0.6.2-preview",
    9.     "com.unity.mathematics": "1.1.0",
    10.     "com.unity.test-framework.performance": "1.0.9-preview",
    11.     "com.unity.burst": "1.1.2",
    12.     "nuget.mono-cecil": "0.1.6-preview",
    13.     "com.unity.jobs": "0.1.1-preview",
    14.     "com.unity.collections": "0.1.1-preview"
    15.   },
    16.   "description": "The Entities package provides a modern Entity Component System (ECS) implementation with a basic set of systems and components made for Unity.",
    17.   "keywords": [
    18.     "entities",
    19.     "dots",
    20.     "unity"
    21.   ],
    22.     "author": {
    23.     "name": "Quatum1000 cern",
    24.     "email": "Open.Days2019@cern.ch",
    25.     "url": "http://www.home.cern"
    26.   }
    27. }
    28.  
    but that gets directly into errors.

    0.jpg
     
    Last edited: Sep 13, 2019
  4. manu73

    manu73

    Unity Technologies

    Joined:
    Aug 22, 2014
    Posts:
    68
    @Quatum1000

    Did you change any assembly definition files and/or namespaces?

    Also when put a package in development, you should not make a copy of it in `<YourProjectPath>/Packages`, but move it.

    Regards,
    EmmanuelH
     
  5. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Did not.

    I don't understand. The Docs say Creating a new embedded package
    1. Create a new subfolder for your package inside the Packages folder.
    2. Open your preferred text editor and create a JSON file called package.json.
    3. Save it under the new package root folder you created.
    4. Fill out all required and mandatory fields in the package manifest (package.json) file.
    My copy is an additional Entities version now:
    Untitled-2.jpg
     
  6. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    Isn't a better solution to actually obey read-only status? I notice Unity REMOVES the read-only status and then overwrites it? Messing about editing json files and pretending a package is mine is a ridiculous suggestion to fix this problem.