{"id":13662462,"url":"https://github.com/caneva20/ConfigAssets","last_synced_at":"2025-04-25T10:31:41.486Z","repository":{"id":37986898,"uuid":"201794706","full_name":"caneva20/ConfigAssets","owner":"caneva20","description":"Simple \u0026 Lightweight solution for managing configuration assets in Unity projects","archived":false,"fork":false,"pushed_at":"2023-07-15T16:56:08.000Z","size":315,"stargazers_count":32,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T05:14:00.288Z","etag":null,"topics":["configs","lightweight","roslyn-generator","scriptableobject","source-generator","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caneva20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-08-11T17:27:41.000Z","updated_at":"2023-09-23T17:18:12.000Z","dependencies_parsed_at":"2024-01-26T19:58:00.072Z","dependency_job_id":null,"html_url":"https://github.com/caneva20/ConfigAssets","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caneva20%2FConfigAssets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caneva20%2FConfigAssets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caneva20%2FConfigAssets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caneva20%2FConfigAssets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caneva20","download_url":"https://codeload.github.com/caneva20/ConfigAssets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223996673,"owners_count":17238347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configs","lightweight","roslyn-generator","scriptableobject","source-generator","unity","unity3d"],"created_at":"2024-08-02T05:01:59.298Z","updated_at":"2024-11-10T18:30:36.025Z","avatar_url":"https://github.com/caneva20.png","language":"C#","readme":"# Config Assets\n\nSimple \u0026 Lightweight solution for managing configuration assets in Unity projects\n\n## Install\n\n1. Install `Editor Coroutines` from Unity's package manager\n    ```shell\n    com.unity.editorcoroutines\n    ```\n    \n    \u003e You can access the package manager by going to `Window \u003e Package Manager` at the top bar in Unity \n\n2. Download \u0026 import the latest `config-assets.unitypackage` from [here](https://github.com/caneva20/ConfigAssets/releases/latest)\nor the [releases](https://github.com/caneva20/ConfigAssets/releases) page.\n\n# Usage\n\nFirst create a `partial class` and add the `Config` attribute to it\n\n```C#\n[Config]\npublic partial class MyConfig {\n    // Your fields \u0026 attributes\n}\n```\n\nThen add as many fields as you need, note that it must be Serializable by Unity for it to save. Anything that is valid\nfor a [`ScriptableObject`](https://docs.unity3d.com/Manual/class-ScriptableObject.html) is valid here as well.\n\n```C#\n[Config]\npublic partial class MyConfig {\n    [SerializeField] private string _myString;\n    [SerializeField] private bool _myBool = true;\n\n    //This also works\n    public int myInt;\n}\n```\n\nYour class is now accessible through a direct static access.\n\u003cbr\u003eTo use it just call `YOUR_CLASS_NAME.YOUR_FIELD`\n\n``` C#\nint valueFromConfig = MyConfig.myInt;\n```\n\n\u003cbr\u003e\n\n* Whenever you get back to Unity, a new `.asset` file will be created for your configuration and it will be added\n  to `Preloaded assets` under the player settings.\n* You can access your configuration through Unity's `Project Settings` under `Edit\u003eProject Settings...` in the toolbar,\n  and then selecting the desired configuration under the `Config assets` section.\n\n# Customization\n\nThe `[Config]` attribute has some properties to allow you to customize you configuration a bit:\n\n| Attribute           | Description                                                                                                                                                               | Default                         |\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|\n| `DisplayName`       | The name used under `Project Settings`                                                                                                                                    | `null` (Will use the type name) |\n| `EnableProvider`    | Whether or not to generate a [`SettingsProvider`](https://docs.unity3d.com/ScriptReference/SettingsProvider.html)                                                         | `true`                          |\n| `Scope`             | The [scope](https://docs.unity3d.com/ScriptReference/SettingsScope.html) used by the [`SettingsProvider`](https://docs.unity3d.com/ScriptReference/SettingsProvider.html) | `SettingsScope.Project`         |\n| `Keywords`          | The keywords used by the [`SettingsProvider`](https://docs.unity3d.com/ScriptReference/SettingsProvider.html)                                                             | none/empty                      |\n| `GenerateSingleton` | Whether or not to generate the `.Instance` property                                                                                                                       | `true`                          |","funding_links":[],"categories":["C\\#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaneva20%2FConfigAssets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaneva20%2FConfigAssets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaneva20%2FConfigAssets/lists"}