Skip to content

HelloPackage_DeveloperFiles

Éloi Strée edited this page Jul 6, 2020 · 2 revisions

Hello 👋.
If you are here, I start from the principle that you read the main tutorial for beginner


🚧 Under construction, sorry for the spelling 🚨


Git Utility & Package Facilitator

For this tutorial, I will take two of my tools that I use in my daily life. They are not the best example of clean project. But they are a good representation of complexe project with several assemblies. And can easily, become a good example later in the year.

Let's start

Basic Structure
As you can see my project is composed of four git and two packages.

Assemblies

To make it short, the assemble is a group of codes linked together.

  • You can have as many as you want in your package or project.
  • You can target the assembly to work on specific platform
    • For example, the assembly of Editor will only target Unity_Editor

The doc ask the assembly in your package to be format like this:

  • country.company.packagename.Runtime
  • country.company.packagename.Editor
    But you can name it what ever you want and half or package don't respect this format.

You can use the format you want with the name of the reference.
Me, I choose to respect the same format as the file one.

Example

Runtime

be.eloistree.unitypackagefacilitator.Runtime.asmdef

{                                                                   
    "name": "be.eloistree.unitypackagefacilitator",          
    "references": ["be.eloistree.quickgitutility","be.eloistree.quickgitutilityeditor"
],                                                              
    "optionalUnityReferences": [],                                 
    "includePlatforms": [], "excludePlatforms": [],                                         
    "allowUnsafeCode": false, "overrideReferences": false,                                    
    "precompiledReferences": [], "autoReferenced": true,                                         
    "defineConstraints": []                                         
} 

be.eloistree.quickgitutility.Runtime.asmdef

{                                                                   
            "name": "be.eloistree.quickgitutility",          
    "references": [
],                                                              
    "optionalUnityReferences": [],                                  
    "includePlatforms": [],                                                  
    "excludePlatforms": [],                                         
    "allowUnsafeCode": false,                                       
    "overrideReferences": false,                                    
    "precompiledReferences": [],                                    
    "autoReferenced": true,                                         
    "defineConstraints": []                                         
}   

Editor

be.eloistree.unitypackagefacilitatoreditor.Editor.asmdef

{
    "name": "be.eloistree.unitypackagefacilitatoreditor",
    "references": [
        "be.eloistree.unitypackagefacilitator",
        "be.eloistree.quickgitutility",
        "be.eloistree.quickgitutilityeditor"
    ],
    "includePlatforms": [
        "Editor"
    ],
    "excludePlatforms": [],
    "allowUnsafeCode": false,
    "overrideReferences": false,
    "precompiledReferences": [],
    "autoReferenced": true,
    "defineConstraints": [],
    "versionDefines": [],
    "noEngineReferences": false
}

be.eloistree.quickgitutilityeditor.Editor.asmdef

{
    "name": "be.eloistree.quickgitutilityeditor",
    "references": [
        "be.eloistree.quickgitutility"
    ],
    "includePlatforms": [
        "Editor"
    ],
    "excludePlatforms": [],
    "allowUnsafeCode": false,
    "overrideReferences": false,
    "precompiledReferences": [],
    "autoReferenced": true,
    "defineConstraints": [],
    "versionDefines": [],
    "noEngineReferences": false
}

Boring topic for me but useful as hell

TDD

Test