This package can be added to Unity in two ways.
Add the package through Package Manager with it's git url. Follow Unity's instructions here and the URL of this repository.
This repository can be embeded under the Packages folder in the Unity project (as raw files or a git submodule). Read here for more information.
Upon code compilation, any files & folders needed for the package are auto created. These files should be committed to source control.
The following folder structure will be created on initial setup.
Assets/
├─ Parameters/
│ ├─ GeneratedCode/ (*contains generated files - DO NOT MODIFY manually*)
│ │ ├─ AssemblyInfo.cs
│ │ ├─ GeneratedParameters.asmdef
│ │ ├─ Editor/
│ │ │ ├─ AssemblyInfo.cs
│ │ │ ├─ GeneratedParameters.Editor.asmdef
│ ├─ Interfaces/ (*contains interface & enums defined by developers*)
│ │ ├─ AssemblyInfo.cs
│ │ ├─ ParameterInterface.asmdefRequired lines will be added to the .gitignore.
The Setup() method needs to be called on app startup (or at the latest, before using any Params APIs.). This will return a loader.
var loader = ParamsSetup.Setup();The params are loaded asynchronously. The Status property in the loader will let be Success upon successful loading. Once it's completed, calls to Params.Get<>() can be utilized.
bool isDone = parameterDataLoader.Status == Success;