Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #258 from DolbyIO/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Kuba Audykowicz authored Jun 21, 2023
2 parents 99700f1 + 015ccd2 commit 5b71e0a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions docs/docs/tutorial/obtain-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@ sidebar_label: macOS Permissions
title: macOS Permissions
---

> **_NOTE:_** macOS only - ignore this section if you are developing on Windows.
## Unreal Engine 5.1 and earlier

Using the plugin in the Unreal Editor requires the editor to obtain microphone and camera permissions. However, on macOS the editor never asks for permissions, so you need to forcefully provide them to your application. To do so, you can use the [tccutil](https://github.com/DocSystem/tccutil) permissions manager and the following commands:
- Epic Games Launcher: `sudo python tccutil.py -e -id com.epicgames.EpicGamesLauncher --microphone --camera`
Using the plugin in the Unreal Editor requires the editor to obtain microphone and camera permissions, however:
- On Unreal Engine 5.0 and earlier, the editor is not packaged correctly to ask for either permission.
- On Unreal Engine 5.1, the editor is not packaged correctly to ask for the camera permission.

Therefore, you need to forcefully provide these permissions to the editors and possibly the Epic Games Launcher. To do so, you can use the [tccutil](https://github.com/DocSystem/tccutil) permissions manager and the following commands:
- Unreal Engine 4: `sudo python tccutil.py -e -id com.epicgames.UE4Editor --microphone --camera`
- Unreal Engine 5: `sudo python tccutil.py -e -id com.epicgames.UnrealEditor --microphone --camera`
- Epic Games Launcher: `sudo python tccutil.py -e -id com.epicgames.EpicGamesLauncher --microphone --camera`

The mentioned permissions manager is not endorsed by Dolby in any way and may be dangerous as it needs root permissions to access sensitive system files and requires you to grant full disk access to the terminal. If you do not wish to use it, you need to find another way to provide the required permissions to the Unreal Editor. Otherwise, you need to package the game to use the plugin and cannot test it in the editor.

## All Unreal Engines

The mentioned permissions manager is not endorsed by Dolby in any way and may be dangerous as it needs root permissions to access sensitive system files and requires you to grant full disk access to the terminal. If you do not wish to use it, you need to find another way to provide the required permissions to the Unreal Editor. Otherwise, you need to package the game to use the plugin and cannot test it in the editor. In order to package games using the plugin with the data required to request the necessary permissions, you need to add the following lines to your game's `Info.plist` file, or, if you want to automatically add these lines to all your packaged games, to the `{UnrealEngineRoot}/Engine/Source/Runtime/Launch/Resources/Mac/Info.plist` file:
In order to package games using the plugin with the data required to request the necessary permissions, you need to add the following lines to your game's `Info.plist` file, or, if you want to automatically add these lines to all your packaged games, to the `{UnrealEngineRoot}/Engine/Source/Runtime/Launch/Resources/Mac/Info.plist` file:

```
<key>NSMicrophoneUsageDescription</key>
Expand All @@ -20,4 +28,4 @@ The mentioned permissions manager is not endorsed by Dolby in any way and may be
<string>Dolby.io Virtual Worlds</string>
```

We recommend the latter solution if it does not conflict with your setup because the `Info.plist` file is overwritten each time the game is packaged.
We recommend the latter solution if it does not conflict with your setup because the `Info.plist` file is overwritten each time the game is packaged. Note that Unreal Engine 5.1 and later provide the `NSMicrophoneUsageDescription` entry, so you only need to add the `NSCameraUsageDescription`.
4 changes: 2 additions & 2 deletions docs/docs/tutorial/remote-video.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ If you launch the game now, assuming you successfully connect to a conference wi

`BP_DolbyIOVideoPlaneSpawner` is a sample actor which handles [`On Video Track Added`](../blueprints/events#on-video-track-added) and [`On Video Track Removed`](../blueprints/events#on-video-track-removed) in its `Event Graph`:

- [`On Video Track Added`](../blueprints/events#on-video-track-added) is handled by spawning a new `BP_DolbyIOGenericVideoPlane`, binding the material of the new plane to the new track ID and saving the plane in a map variable.
- [`On Video Track Added`](../blueprints/events#on-video-track-added) is handled by spawning a new `BP_DolbyIOGenericVideoPlane`, binding the material of the new plane to the new track ID, and saving the plane in a map variable.

- [`On Video Track Removed`](../blueprints/events#on-video-track-removed) is handled by destroying the plane which is bound to the track and removing it from the map variable.

The implementation of these events is specific to this (rather artificial) use case, but it shows that it is possible to render many videos without much effort.

For a more practical example, consider a case where you have avatars with video planes positioned above the avatars' heads. The planes should have their materials set up as shown in the `Construction Script` above. Assuming you already have a way of managing the avatar actors (their world transform, their lifetime, etc.) and each avatar corresponds to a participant ID, then all you need to is bind the material from a selected avatar's video plane to the participant's video track.
For a more practical example, consider a case where you have avatars with video planes positioned above the avatars' heads. The planes should have their materials set up as shown in the `Construction Script` above. Assuming you already have a way of managing the avatar actors (their world transform, their lifetime, etc.) and each avatar corresponds to a participant ID, then all you need to do is bind the material from a selected avatar's video plane to the participant's video track.

0 comments on commit 5b71e0a

Please sign in to comment.