{"id":17754651,"url":"https://github.com/ovpavlov/unit-generator","last_synced_at":"2026-04-28T17:34:16.320Z","repository":{"id":259413907,"uuid":"871273712","full_name":"OVPavlov/unit-generator","owner":"OVPavlov","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-24T09:32:43.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T07:12:52.519Z","etag":null,"topics":["dimensional-analysis","math","mathematics","metric-system","physics","units","units-of-measurement","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/OVPavlov.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,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T16:00:02.000Z","updated_at":"2024-10-24T09:32:47.000Z","dependencies_parsed_at":"2024-10-25T07:12:57.213Z","dependency_job_id":"df7e860c-8bd1-423d-9feb-4013dffecf8a","html_url":"https://github.com/OVPavlov/unit-generator","commit_stats":null,"previous_names":["ovpavlov/unit-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OVPavlov%2Funit-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OVPavlov%2Funit-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OVPavlov%2Funit-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OVPavlov%2Funit-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OVPavlov","download_url":"https://codeload.github.com/OVPavlov/unit-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246628421,"owners_count":20808106,"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":["dimensional-analysis","math","mathematics","metric-system","physics","units","units-of-measurement","unity","unity3d"],"created_at":"2024-10-26T14:07:50.800Z","updated_at":"2026-04-28T17:34:16.018Z","avatar_url":"https://github.com/OVPavlov.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unit Generator\n\nGenerates physics metric units, and performs compile time dimensional analysis\n\n## Compile time dimensional analysis:\n\u003cimg src=\"https://github.com/user-attachments/assets/084a0cf4-6a85-4167-b377-9c4821af0e0c\" width=\"590\"\u003e\n\nNow you don't need to worry about messing up your physics equations\n\nHow it works:\n\n\u003cimg src=\"https://github.com/user-attachments/assets/5dad8d69-4ea7-463a-bb92-7ca8c1881147\" width=\"285\"\u003e\n\nyou configure the generator and it generates all the units and operations with dimensional analysis already done.\n```cs\npublic static N operator /(W power, mps speed) =\u003e new N(power.f / speed.f);\n```\n\n## Bonus feature - Units in your editor:\n\n\u003cimg src=\"https://github.com/user-attachments/assets/49e1f656-aa80-41cd-8243-26036dfa0823\" width=\"252\"\u003e\n\nDon't worry all the conversions happen in editor.\n\nYou can configure whatewer units you want in your editor.\n\nSupports All the physics units: s, kg, m, A, K, mol, cd;\n\nBonus unit: rad for more efficien conversion from deg to rad in editor. \n\n## How to use: \n1. Create UnitGenerator ScriptableObject in a directory where you want to generate the units code.\n    1. Alternatively you can Copy Packages/com.ovpavlov.unitgenerator/Editor/UnitGeneratorExample.asset for preconfigured generator example\n2. Toggle 'Dry Run' and then press 'Generate Button'(which in fact is a Button that looks like a toggle), and check Console to see diagnostics. \n3. Untoggle 'Dry Run' and then press 'Generate Button' to generate the code \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovpavlov%2Funit-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovpavlov%2Funit-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovpavlov%2Funit-generator/lists"}