{"id":18333115,"url":"https://github.com/candycoded/env","last_synced_at":"2025-04-07T09:15:51.062Z","repository":{"id":46230428,"uuid":"345823400","full_name":"CandyCoded/env","owner":"CandyCoded","description":"Use .env files in your Unity projects.","archived":false,"fork":false,"pushed_at":"2025-02-27T04:36:07.000Z","size":45,"stargazers_count":52,"open_issues_count":5,"forks_count":12,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T08:07:51.756Z","etag":null,"topics":[],"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/CandyCoded.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null}},"created_at":"2021-03-08T23:24:41.000Z","updated_at":"2025-03-26T03:46:07.000Z","dependencies_parsed_at":"2025-02-26T23:40:24.733Z","dependency_job_id":null,"html_url":"https://github.com/CandyCoded/env","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CandyCoded%2Fenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CandyCoded%2Fenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CandyCoded%2Fenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CandyCoded%2Fenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CandyCoded","download_url":"https://codeload.github.com/CandyCoded/env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622988,"owners_count":20968575,"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":[],"created_at":"2024-11-05T19:41:21.726Z","updated_at":"2025-04-07T09:15:51.040Z","avatar_url":"https://github.com/CandyCoded.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# env\n\n\u003e Use `.env` files in your Unity projects.\n\n[![npm](https://img.shields.io/npm/v/xyz.candycoded.env)](https://www.npmjs.com/package/xyz.candycoded.env)\n\n### Unity Package Manager\n\n\u003chttps://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.0/manual/index.html\u003e\n\n#### Git\n\n```json\n{\n  \"dependencies\": {\n    \"xyz.candycoded.env\": \"https://github.com/CandyCoded/env.git#v1.1.5\",\n    ...\n  }\n}\n```\n\n#### Scoped UPM Registry\n\n```json\n{\n  \"dependencies\": {\n    \"xyz.candycoded.env\": \"1.1.5\",\n    ...\n  },\n  \"scopedRegistries\": [\n    {\n      \"name\": \"candycoded\",\n      \"url\": \"https://registry.npmjs.com\",\n      \"scopes\": [\"xyz.candycoded\"]\n    }\n  ]\n}\n```\n\n## Usage\n\nCreate a `.env` file at the root of your project, outside of the `Assets/` folder, and paste the following content:\n\n```\nDEBUG=true\n```\n\nOr use the Editor panel found by navigating to **Window** \u003e **CandyCoded** \u003e **Environment File Editor**.\n\n\u003cimg src=\"https://i.imgur.com/qtBzAh3.png\" width=\"400\"\u003e\n\u003cimg src=\"https://i.imgur.com/QxT0bP1.png\" width=\"400\"\u003e\n\n\u003e Note: Don't forget to add `.env` to your `.gitignore` file before committing any changes!\n\nNow you can reference the variables and their values with the key specified in the `.env` file. Supported value types\nare `string`, `bool`, `double`, `float`, and `int`.\n\n```csharp\nif (env.TryParseEnvironmentVariable(\"DEBUG\", out bool isDebug))\n{\n    Debug.Log($\"Debug Mode is: {(isDebug ? \"ON\" : \"OFF\")}\");\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandycoded%2Fenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcandycoded%2Fenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandycoded%2Fenv/lists"}