{"id":18610487,"url":"https://github.com/unitytechnologies/ar_industrial","last_synced_at":"2026-01-24T18:02:12.599Z","repository":{"id":108305345,"uuid":"262943191","full_name":"UnityTechnologies/AR_Industrial","owner":"UnityTechnologies","description":"AR Foundation project showing off functionality for HoloLens 2 and mobile","archived":false,"fork":false,"pushed_at":"2020-06-15T01:24:49.000Z","size":21345,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-13T14:33:32.286Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ShaderLab","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/UnityTechnologies.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":"2020-05-11T05:02:14.000Z","updated_at":"2024-02-06T21:41:45.000Z","dependencies_parsed_at":"2023-05-21T11:30:19.478Z","dependency_job_id":null,"html_url":"https://github.com/UnityTechnologies/AR_Industrial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UnityTechnologies/AR_Industrial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FAR_Industrial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FAR_Industrial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FAR_Industrial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FAR_Industrial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UnityTechnologies","download_url":"https://codeload.github.com/UnityTechnologies/AR_Industrial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FAR_Industrial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28733305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T17:51:25.893Z","status":"ssl_error","status_checked_at":"2026-01-24T17:50:48.377Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07T03:10:21.148Z","updated_at":"2026-01-24T18:02:12.579Z","avatar_url":"https://github.com/UnityTechnologies.png","language":"ShaderLab","readme":"# AR Industrial Demo\nThis is a multi-platform demo that shows functionality between HoloLens 2 and mobile AR (ARKit / ARCore). Originally presented at the Microsoft Mixed Reality Developer Day 2020. Full talk recording available [here](https://channel9.msdn.com/Shows/Docs-Mixed-Reality/Getting-started-with-the-HoloLens-2-and-Unity)\n\nIt uses Unity's [AR Foundation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.1/manual/index.html) to enable tracking and rendering on the supported platforms. It uses [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@8.1/manual/index.html) to hit performant framerates on all platforms. \n\n![HeaderImage](https://user-images.githubusercontent.com/2120584/84608471-84bc0300-ae67-11ea-9062-be522a06125e.png)\n\n## HoloLens 2 support\nThe input for HoloLens 2 uses the native WindowsMR API's to recognize the pinch gesture and native XR API's to track the hands positions and rotations. \n\n### Gestures\nListen for the air tap\n``` \nm_MRGestures.onTappedChanged += OnTapped;\n```\nCheck if the hand device is valid and set the particle effect to the device location and play it, call CallActivate based on the hand position\n```\nvoid OnTapped(WindowsMRTappedGestureEvent eventArgs)\n{\n    if (m_LeftHandDevice.isValid)\n    {\n         m_TapParticleSystem.transform.position = m_LeftHandPos * m_ScaleMod;\n         m_TapParticleSystem.Play();\n         CallActivate(m_LeftHandPos * m_ScaleMod);\n    }\n}\n```\n\n### Hand Tracking\n\n![IndustrialAR_Handtracking](https://user-images.githubusercontent.com/2120584/84608582-fac06a00-ae67-11ea-9e48-6a76ae72ff41.png)\n\nGet a list of devices based on characteristics \n```\nm_RightHandDevices = new List\u003cInputDevice\u003e();\nm_LeftHandDevices = new List\u003cInputDevice\u003e();\n\nInputDevices.GetDevicesWithCharacteristics(InputDeviceCharacteristics.Right, m_RightHandDevices);\nInputDevices.GetDevicesWithCharacteristics(InputDeviceCharacteristics.Left, m_LeftHandDevices);\n```\nAssign the devices and enable the hand visual *we are assuming there to only be one device for left and right hand*\n```\nif(m_RightHandDevices.Count \u003e 0)\n{\n       m_RightHandDevice = m_RightHandDevices[0];\n       m_RightHandVisual.gameObject.SetActive(true);\n}\n\nif(m_LeftHandDevices.Count \u003e 0)\n{\n       m_LeftHandDevice = m_LeftHandDevices[0];\n       m_LeftHandVisual.gameObject.SetActive(true);\n}\n```\nSubscribe to device connected and disconnected events     \n```\nInputDevices.deviceConnected += DeviceConnected;\nInputDevices.deviceDisconnected += DeviceDisconnected;\n```\n\nOn connected event, check the device characters has the `.Right` or `.Left` and assign the device\n```\nvoid DeviceConnected(InputDevice device)\n{\n     if((device.characteristics \u0026 InputDeviceCharacteristics.Right) != 0)\n     {\n         m_RightHandDevice = device;\n         m_RightHandVisual.gameObject.SetActive(true);\n     }\n}\n```\n\n## Mobile AR Support\nUses native `Input` class for determining when the user touches the device\n\n![IndustrialAR_Mobile](https://user-images.githubusercontent.com/2120584/84608546-d6fd2400-ae67-11ea-9dff-8b8163b31ea4.png)\n\nUse a reference to the camera to do a raycast based on the users touch position and call CallActivate()\n```\nif (Input.touchCount \u003e 0)\n{\n     Touch touch = Input.GetTouch(0);\n\n      if (touch.phase == TouchPhase.Began)\n      {\n           m_CamerRay = Camera.main.ScreenPointToRay(touch.position);\n           if (Physics.Raycast(m_CamerRay, out m_Hit))\n           {\n                m_TapParticleSystem.transform.position = m_Hit.point;\n                m_TapParticleSystem.Play();\n                CallActivate(m_Hit.point);\n           }\n      }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitytechnologies%2Far_industrial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funitytechnologies%2Far_industrial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitytechnologies%2Far_industrial/lists"}