{"id":18905277,"url":"https://github.com/habrador/unity-select-units-within-rectangle-tutorial","last_synced_at":"2025-04-15T04:21:07.628Z","repository":{"id":147472082,"uuid":"257208918","full_name":"Habrador/Unity-Select-Units-Within-Rectangle-Tutorial","owner":"Habrador","description":"Unity tutorial on how to select units within rectangle","archived":false,"fork":false,"pushed_at":"2020-07-13T11:18:52.000Z","size":117,"stargazers_count":27,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T15:48:26.130Z","etag":null,"topics":["gamedev","opensource","unity","unity-tutorial","unity3d"],"latest_commit_sha":null,"homepage":"https://www.habrador.com/tutorials/select-units-within-rectangle/","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/Habrador.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}},"created_at":"2020-04-20T07:48:59.000Z","updated_at":"2025-02-20T01:39:47.000Z","dependencies_parsed_at":"2023-07-24T18:30:10.851Z","dependency_job_id":null,"html_url":"https://github.com/Habrador/Unity-Select-Units-Within-Rectangle-Tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habrador%2FUnity-Select-Units-Within-Rectangle-Tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habrador%2FUnity-Select-Units-Within-Rectangle-Tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habrador%2FUnity-Select-Units-Within-Rectangle-Tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habrador%2FUnity-Select-Units-Within-Rectangle-Tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Habrador","download_url":"https://codeload.github.com/Habrador/Unity-Select-Units-Within-Rectangle-Tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249004367,"owners_count":21196863,"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":["gamedev","opensource","unity","unity-tutorial","unity3d"],"created_at":"2024-11-08T09:11:21.641Z","updated_at":"2025-04-15T04:21:07.587Z","avatar_url":"https://github.com/Habrador.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Select units within rectangle\n\nSource code for Unity tutorial on how to select units within rectangle. Notice that the code is not exactly as in the tutorial because I've learned one or two things but the idea is the same. The main difference you should change is that border of the selection square has to be 2 pixels wide, or you will see some flickering. \n\n![Closest point on line segment](/_media/select-units-within-square.png?raw=true)\n\nYouTube video showing the result:\n\n[![Select units in Unity video](http://img.youtube.com/vi/DXsF87vbwYU/0.jpg)](http://www.youtube.com/watch?v=DXsF87vbwYU \"Select units in Unity video\")\n\nLink to the tutorial: https://www.habrador.com/tutorials/select-units-within-rectangle/\n\nIf you also want to highlight the units you selected with some rectangle around it, the idea is basically the same. This is a good tutorial on the topic: https://www.youtube.com/watch?v=2Tgqr1_ajqE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhabrador%2Funity-select-units-within-rectangle-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhabrador%2Funity-select-units-within-rectangle-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhabrador%2Funity-select-units-within-rectangle-tutorial/lists"}