{"id":15966991,"url":"https://github.com/creativeikep/unicamex","last_synced_at":"2025-03-15T09:31:43.697Z","repository":{"id":172146086,"uuid":"647732980","full_name":"creativeIKEP/UniCamEx","owner":"creativeIKEP","description":"UniCamEx is a virtual camera for MacOS that can display textures output from Unity.","archived":false,"fork":false,"pushed_at":"2024-04-21T11:59:24.000Z","size":1012,"stargazers_count":42,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T07:11:34.791Z","etag":null,"topics":["core-media-io","macos","system-extension","unity","virtual-camera"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/creativeIKEP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-05-31T12:07:48.000Z","updated_at":"2025-03-13T01:42:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"aba10257-ac9c-43f6-8e91-8c4ec64e1a75","html_url":"https://github.com/creativeIKEP/UniCamEx","commit_stats":null,"previous_names":["creativeikep/unicamex"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeIKEP%2FUniCamEx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeIKEP%2FUniCamEx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeIKEP%2FUniCamEx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeIKEP%2FUniCamEx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativeIKEP","download_url":"https://codeload.github.com/creativeIKEP/UniCamEx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713357,"owners_count":20335564,"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":["core-media-io","macos","system-extension","unity","virtual-camera"],"created_at":"2024-10-07T18:07:16.258Z","updated_at":"2025-03-15T09:31:43.253Z","avatar_url":"https://github.com/creativeIKEP.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UniCamEx\n![UniCamEx_demo](https://user-images.githubusercontent.com/34697515/243058841-e07ced4d-5d55-469f-bac0-0a88cdf6a90e.gif)\n\nUniCamEx is a virtual camera for MacOS that can display textures output from Unity.\n\nYou can use in macOS 12.3 and later because UniCamEx use Apple's [Camera Extension with Core Media I/O](https://developer.apple.com/documentation/coremediaio/creating_a_camera_extension_with_core_media_i_o).\n\n## Usage\n### Usage for Develop send textures from Unity Editor\nThis repository has the demo that send textures from Unity Editor.\n\nCheck a Unity [scene](https://github.com/creativeIKEP/UniCamEx/blob/v1.1.0/UniCamEx_Unity/Assets/Scenes/SampleScene.unity).\n\n#### 1. Install\nUniCamEx can be installed with Unity Package Manager.\n\nUniCamEx can be installed from npm or GitHub URL.\n\n##### Install from npm (Recommend)\nUniCamEx can be installed by adding following sections to your manifest file (`Packages/manifest.json`).\n\nTo the `scopedRegistries` section:\n```\n{\n  \"name\": \"creativeikep\",\n  \"url\": \"https://registry.npmjs.com\",\n  \"scopes\": [ \"jp.ikep\" ]\n}\n```\nTo the `dependencies` section:\n```\n\"jp.ikep.unicamex\": \"1.2.0\"\n```\nFinally, the manifest file looks like below:\n```\n{\n    \"scopedRegistries\": [\n        {\n            \"name\": \"creativeikep\",\n            \"url\": \"https://registry.npmjs.com\",\n            \"scopes\": [ \"jp.ikep\" ]\n        }\n    ],\n    \"dependencies\": {\n        \"jp.ikep.unicamex\": \"1.2.0\",\n        ...\n    }\n}\n```\n\n##### Install from GitHub URL \nUniCamEx can be installed by adding below URL on the Unity Package Manager's window\n```\nhttps://github.com/creativeIKEP/UniCamEx.git?path=UniCamEx_Unity/Packages/UniCamEx#v1.2.0\n```\nor, adding below sentence to your manifest file(`Packages/manifest.json`) `dependencies` block. Example is below.\n```\n{\n  \"dependencies\": {\n    \"jp.ikep.unicamex\": \"https://github.com/creativeIKEP/UniCamEx.git?path=UniCamEx_Unity/Packages/UniCamEx#v1.2.0\",\n    ...\n  }\n}\n\n```\n\n#### 2. Send textures from Unity Editor\nYou can send camera rendered images with adding a `UniCamExSender` component to camera in your scenes.\nIf you want to send any video, you can do so by directly using the `UniCamExPlugin` class.\nPlease refer to `UniCamExSender` class for usage instructions.\n\n#### 3. Install an Auxiliary app for UniCamEx\nDownload `UniCamExExtensionInstaller.zip` for auxiliary app of UniCamEx from [release page](https://github.com/creativeIKEP/UniCamEx/releases/latest) and Open the zip file.\n\n**Move `UniCamExExtensionInstaller.app` to `~/Applications` directory** and run `UniCamExExtensionInstaller.app`.\n\n#### 4. Install UniCamEx Virtual Camera\nPush `Install` button.\n\nAllow using System Extension from the Mac setting if the dialog that blocked System Extension is displayed.\n\n\u003cimg width=\"716\" alt=\"UniCamExInstallerDialog\" src=\"https://user-images.githubusercontent.com/34697515/243059855-6055772a-05f2-40e6-aa55-7ae249c787f7.png\"\u003e\n\n\u003cimg width=\"491\" alt=\"UniCamExInstallerSecurityAllowDialog\" src=\"https://user-images.githubusercontent.com/34697515/243059932-81f921eb-c410-4243-85e6-0a80a6716ab3.png\"\u003e\n\nThen, you can select the camera named \"UniCamEx\" with any camera appication and can see textures output from Unity Editor！\n\n\u003cimg width=\"1172\" alt=\"SendTextureFromUnityEditor\" src=\"https://user-images.githubusercontent.com/34697515/243060010-18464804-4efb-4f04-b056-d3f7a9d57f6a.png\"\u003e\n\n### Usage for Build the Standalone App\nYou must enroll the [Apple Developer Program membership](https://developer.apple.com/programs/) for building the app used System Extension.\n\n#### 1. Clone this repository\nYou must build UniCamEx project for embeding to your the Standalone App.\nSo, you need to clone this repository.\n\n#### 2. Copy UniCamEx's Unity Package to Your Unity Project\nCopy `UniCamEx/UniCamEx_Unity/Packages/UniCamEx` directory to `\u003cYour Unity Project\u003e/Packages` directory.\n\n#### 3. Build UniCamEx Xcode Project with Your Custom Configuration.\n1. Open `UniCamEx/UniCamEx/UniCamEx.xcodeproj`.\n2. Change to your custom Bundle Identifier in `Extension` target and the name of the App Groups in the `Extension` target.\nThe name of the App Groups in the `Extension` target must start with the Bundle Identifier in the `Extension` target.\nAlso, sign in with your Apple developer account.\n\u003cimg width=\"671\" alt=\"3-2\" src=\"https://github.com/creativeIKEP/UniCamEx/assets/34697515/b4d37c9a-1fb8-4b75-938d-f5081e58f432\"\u003e\n\n3. Change to your custom configuration in  `UniCamEx/UniCamEx/UniCamExConfig.swift`.\n4. Set `Build Configuration` to `Release`, and build `Extension` and `UniCamExBundle` in targets.\n\u003cimg width=\"814\" alt=\"3-4\" src=\"https://github.com/creativeIKEP/UniCamEx/assets/34697515/80939423-c129-4140-82ca-5c14fd7e706d\"\u003e\n\n#### 4. Integrate Your Custom Built Items to Unity.\n1. Replace from `\u003cYour Unity Project\u003e/Packages/UniCamEx/PostProcessData~/jp.ikep.UniCamEx.Extension.systemextension` to your built `.systemextension`.\n2. Replace from `\u003cYour Unity Project\u003e/Packages/UniCamEx/Plugins/macOS/UniCamExBundle.bundle` to your built `UniCamExBundle.bundle`.\n3. Rewrite from `jp.ikep.UniCamEx.Extension.systemextension` to your built `.systemextension` file name in [`\u003cYour Unity Project\u003e/Packages/UniCamEx/Scripts/Editor/MacXcodeProjPostProcess.cs`](https://github.com/creativeIKEP/UniCamEx/blob/v1.1.0/UniCamEx_Unity/Packages/UniCamEx/Scripts/Editor/MacXcodeProjPostProcess.cs#L11-L12) and [`\u003cYour Unity Project\u003e/Packages/UniCamEx/PostProcessData~/PostprocessBuild.py`](https://github.com/creativeIKEP/UniCamEx/blob/v1.1.0/UniCamEx_Unity/Packages/UniCamEx/PostProcessData~/PostprocessBuild.py#L8-L9).\n\n#### 5. Coding for Send textures from Unity\nYou can send camera rendered images with adding a `UniCamExSender` component to camera in your scenes.\nAlso, you can send textures using the `UniCamExPlugin.Send` method.\n\n#### 6. Export Xcode Project with Unity\n**Turn on \"Create Xcode Project\"** on the Build Settings window.\n\nAlso, **build from the \"Clean Build...\" button**.\n\nExporting Xcode Project can does the necessary settings for [Camera Extension with Core Media I/O](https://developer.apple.com/documentation/coremediaio/creating_a_camera_extension_with_core_media_i_o).\nNecessary settings for [Camera Extension with Core Media I/O](https://developer.apple.com/documentation/coremediaio/creating_a_camera_extension_with_core_media_i_o) is set with post process build of UniCamEx.\nPost process build of UniCamEx may not work if you did not build from the \"Clean Build...\" button.\n\n\u003cimg width=\"625\" alt=\"UnityBuildSettings\" src=\"https://user-images.githubusercontent.com/34697515/243060045-7342da5e-dc8f-48ea-b350-a2225d0d26ae.png\"\u003e\n\n#### 7. Build .app with Xcode\nOpen exported `.xcodeproj` file with Xcode and sign in with your Apple developer account.\n\nYou must enroll the [Apple Developer Program membership](https://developer.apple.com/programs/) for building the app used System Extension.\n\nYou can build an app after sign in with Apple developer account that enrolled Apple Developer Program membership.\n\n#### 8. Run the Built App\n**Move built app from build directory to `~/Applications` directory** and run your app.\n\nAllow using System Extension from the Mac setting if the dialog that blocked System Extension is displayed.\n\n\u003cimg width=\"255\" alt=\"BuildAppDialog\" src=\"https://user-images.githubusercontent.com/34697515/243060103-ffd8a674-a7a4-4b16-958a-a7d4162abdc4.png\"\u003e\n\n\u003cimg width=\"490\" alt=\"BuildAppSecurityAllowDialog\" src=\"https://user-images.githubusercontent.com/34697515/243060158-d4e271fa-f45a-41cf-ab1d-5aac8d44b9f2.png\"\u003e\n\nThen, you can select virtual camera with any camera appication and can see textures output from your app made with Unity！\n\n![SendTextureFromBuildApp](https://user-images.githubusercontent.com/34697515/243060218-c4e6f9fc-ae49-48ed-ad8f-7559c22b6179.png)\n\n\n## Author\n[IKEP](https://ikep.jp)\n\n## LICENSE\nCopyright (c) 2023 IKEP\n\n[MIT](/LICENSE.md)\n\n## Others\n- UniCamEx implementation is inspired by article below and I referenced it. Thanks!\n  - https://qiita.com/fuziki/items/405c681a0cae702ad092","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativeikep%2Funicamex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativeikep%2Funicamex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativeikep%2Funicamex/lists"}