|
1 | 1 | # Unity Visual Scripting |
2 | 2 |
|
3 | | -The Dolby.io Unity Plugin provides nodes for Unity Visual Scripting from 2021.* version. The nodes exposes some of the functionnalities available in the .NET SDK. |
| 3 | +Visual Scripting in Unity allows creating logic for games or applications without writing code, using visual, node-based graphs. The Dolby.io Communications Plugin for Unity provides nodes that allow using .NET SDK functionalities in Unity Visual Scripting 2021. The plugin can be used with Visual Scripting and C# scripting at the same time. This document describes the available nodes and events. |
4 | 4 |
|
5 | | ->**note:** You can use the plugin with Visual Scripting and C# Scripting at the same time. |
| 5 | +Before using the plugin for visual scripting, make sure that you added the .NET SDK to Unity and initialized the SDK using the [Initializing] procedure. |
6 | 6 |
|
7 | | -## Prerequisites |
| 7 | +## Visual Scripting Nodes |
8 | 8 |
|
9 | | -The prerequisites are the same as for the [Plugin](./unity.md#prerequisites). |
10 | | - |
11 | | -For the visual scripting nodes to work you have to add the `DolbyIOManager` as explained in [Adding the .NET SDK to Unity](./unity.md#adding-the-net-sdk-to-unity). |
12 | | - |
13 | | -## The Visual Scripting Nodes |
14 | | - |
15 | | -Nodes are accessible in the "Add Node" contextual menu, under the DolbyIO Category: |
| 9 | +The Dolby.io nodes are accessible in the "Add Node" contextual menu, under the DolbyIO category: |
16 | 10 |
|
17 | 11 | <div style="text-align:center"> |
18 | 12 | <img style="padding:25px 0" src="~/images/nodes/menu.png" width="200px"> |
19 | 13 | </div> |
20 | 14 |
|
21 | | -### Initializing |
| 15 | +### Initialize |
22 | 16 |
|
23 | | -This node allows you to initialize the DolbyIO SDK and to open a session to the Dolby.io backend. |
| 17 | +Allows initializing the SDK and opening a session that connects the SDK with the Dolby.io backend. |
24 | 18 |
|
25 | 19 | <div style="text-align:center"> |
26 | 20 | <img style="padding:25px 0" src="~/images/nodes/init.png" width="300px"> |
27 | 21 | </div> |
28 | 22 |
|
29 | 23 | Parameters: |
30 | 24 |
|
31 | | -- **Access Token**: The access token provided by the customer's backend. See [](xref:DolbyIO.Comms.DolbyIOSDK.InitAsync(System.String,DolbyIO.Comms.RefreshTokenCallBack)). |
32 | | -- **Participant Name**: The name of the participant. See [](xref:DolbyIO.Comms.UserInfo.Name). |
| 25 | +- **Access Token**: The [access token](xref:DolbyIO.Comms.DolbyIOSDK.InitAsync(System.String,DolbyIO.Comms.RefreshTokenCallBack)) provided by the customer's backend. |
| 26 | +- **Participant Name**: The [name](xref:DolbyIO.Comms.UserInfo.Name) of the participant. |
33 | 27 |
|
34 | 28 | ### Spatial Conference |
35 | 29 |
|
36 | | -This node allows you to enter a spatial conference and specify the 3D Environment settings. |
| 30 | +Allows entering a conference with enabled Spatial Audio and specifying the settings of the 3D environment. |
37 | 31 |
|
38 | 32 | <div style="text-align:center"> |
39 | 33 | <img style="padding:25px 0" src="~/images/nodes/spatial.png" width="300px"> |
40 | 34 | </div> |
41 | 35 |
|
42 | 36 | Parameters: |
43 | 37 |
|
44 | | -- **Scale, Forward, Up, Right**: Those vectors are definition for the 3D Environment you are working with. The defaults are based on the Unity Coordinates System. In most cases only the scale should be modified. See [](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialEnvironmentAsync(System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3)). |
45 | | -- **Conference Alias**: The conference alias. See [](xref:DolbyIO.Comms.Conference.Alias). |
46 | | -- **Spatial Audio Style**: The spatial audio style, default to Shared. See [](xref:DolbyIO.Comms.SpatialAudioStyle). |
| 38 | +- **Scale, Forward, Up, Right**: [Vectors](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialEnvironmentAsync(System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3)) that define the 3D environment that you are working with. The default values are based on the Unity Coordinates System. In most cases, you should only modify the scale. |
| 39 | +- **Conference Alias**: The conference [alias](xref:DolbyIO.Comms.Conference.Alias). |
| 40 | +- **Spatial Audio Style**: The [spatial audio style](xref:DolbyIO.Comms.SpatialAudioStyle) that defines how the spatial location should be communicated between the SDK and the Dolby.io server. By default, the parameter is set to `shared`. |
47 | 41 |
|
48 | 42 | ### Demo |
49 | 43 |
|
50 | | -This node allows you to experience the demo of the Dolby.io platform. |
| 44 | +Allows experiencing the demo of the Dolby.io platform. |
51 | 45 |
|
52 | 46 | <div style="text-align:center"> |
53 | 47 | <img style="padding:25px 0" src="~/images/nodes/demo.png" width="200px"> |
54 | 48 | </div> |
55 | 49 |
|
56 | 50 | Parameters: |
57 | 51 |
|
58 | | -- **Scale, Forward, Up, Right**: Those vectors are definition for the 3D Environment you are working with. The defaults are based on the Unity Coordinates System. In most cases only the scale should be modified. See [](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialEnvironmentAsync(System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3)). |
59 | | -- **Spatial Audio**: Join the demo with spatial audio or not. |
| 52 | +- **Scale, Forward, Up, Right**: [Vectors](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialEnvironmentAsync(System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3)) that define the 3D environment that you are working with. The default values are based on the Unity Coordinates System. In most cases, you should only modify the scale. |
| 53 | +- **Spatial Audio**: A boolean that indicates whether spatial audio should be enabled. |
60 | 54 |
|
61 | 55 | ### Mute Participant |
62 | 56 |
|
63 | | -This node allows you to mute yourself or a specific participant. |
| 57 | +Allows muting a specific participant. |
64 | 58 |
|
65 | 59 | <div style="text-align:center"> |
66 | 60 | <img style="padding:25px 0" src="~/images/nodes/mute.png" width="250px"> |
67 | 61 | </div> |
68 | 62 |
|
69 | 63 | Parameters: |
70 | | -- **ParticipantId**: The id of the participant to mute. If no Id is provided, the node will mute the local participant. |
71 | | -- **Muted**: The mute state to apply. |
| 64 | +- **ParticipantId**: The ID of the participant who should be muted. If the ID is not provided, the node mutes the local participant. |
| 65 | +- **Muted**: The required mute state. |
72 | 66 |
|
73 | 67 | ### Local Player Position |
74 | 68 |
|
75 | | -This node allows you to set the local player position. |
| 69 | +Allows setting the position of the local player. |
76 | 70 |
|
77 | 71 | <div style="text-align:center"> |
78 | 72 | <img style="padding:25px 0" src="~/images/nodes/local-position.png" width="250px"> |
79 | 73 | </div> |
80 | 74 |
|
81 | 75 | Parameters: |
82 | | -- **Position**: The position of the player. See [](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialPositionAsync(System.String,System.Numerics.Vector3)) |
83 | | -- **Direction**: The direction of the player. See [](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialDirectionAsync(System.Numerics.Vector3)) |
| 76 | +- **Position**: The [position](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialPositionAsync(System.String,System.Numerics.Vector3)) of the player. |
| 77 | +- **Direction**: The [direction](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialDirectionAsync(System.Numerics.Vector3)) that the player should be facing. |
84 | 78 |
|
85 | 79 | ### Remote Player Position |
86 | 80 |
|
87 | | -This node allows you to set the remote player position. |
| 81 | +Allows setting the remote player's position. |
88 | 82 |
|
89 | 83 | <div style="text-align:center"> |
90 | 84 | <img style="padding:25px 0" src="~/images/nodes/remote-position.png" width="250px"> |
91 | 85 | </div> |
92 | 86 |
|
93 | 87 | Parameters: |
94 | | -- **Position**: The position of the player. See [](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialPositionAsync(System.String,System.Numerics.Vector3)) |
| 88 | +- **Position**: The [position](xref:DolbyIO.Comms.Services.ConferenceService.SetSpatialPositionAsync(System.String,System.Numerics.Vector3)) of the player. |
95 | 89 |
|
96 | 90 |
|
97 | 91 | ### Get Participants |
98 | 92 |
|
99 | | -This node allows you to get all the participants of the conference. |
| 93 | +Allows getting objects of all participants who are present at a conference. |
100 | 94 |
|
101 | 95 | <div style="text-align:center"> |
102 | 96 | <img style="padding:25px 0" src="~/images/nodes/participants.png" width="250px"> |
103 | 97 | </div> |
104 | 98 |
|
105 | 99 | Parameters: |
106 | | -- **Participant Ids**: A list to filter the resulting participant list. |
| 100 | +- **Participant Ids**: A list of participant IDs that causes returning only the objects of the listed participants. |
107 | 101 |
|
108 | 102 | ## The Visual Scripting Events |
109 | 103 |
|
110 | 104 | ### On Conference Status Updated Event |
111 | 105 |
|
112 | | -This event is emitted when the conference status has changed. See [](xref:DolbyIO.Comms.Services.ConferenceService.StatusUpdated) |
| 106 | +Emitted when a conference status has [changed](xref:DolbyIO.Comms.Services.ConferenceService.StatusUpdated). |
113 | 107 |
|
114 | 108 | <div style="text-align:center"> |
115 | 109 | <img style="padding:25px 0" src="~/images/nodes/event-conference-status.png" width="250px"> |
116 | 110 | </div> |
117 | 111 |
|
118 | 112 | ### On Participant Added Event |
119 | 113 |
|
120 | | -This event is emitted when a new participant has been added to the conference. See [](xref:DolbyIO.Comms.Services.ConferenceService.ParticipantAdded) |
| 114 | +Emitted when a new participant has been [added](xref:DolbyIO.Comms.Services.ConferenceService.ParticipantAdded) to a conference. |
121 | 115 |
|
122 | 116 | <div style="text-align:center"> |
123 | 117 | <img style="padding:25px 0" src="~/images/nodes/event-participant-added.png" width="250px"> |
124 | 118 | </div> |
125 | 119 |
|
126 | 120 | ### On Participant Updated Event |
127 | 121 |
|
128 | | -This event is emitted when when a conference participant has changed a status. See [](xref:DolbyIO.Comms.Services.ConferenceService.ParticipantUpdated) |
| 122 | +Emitted when a conference participant has [changed](xref:DolbyIO.Comms.Services.ConferenceService.ParticipantUpdated) a status. |
129 | 123 |
|
130 | 124 | <div style="text-align:center"> |
131 | 125 | <img style="padding:25px 0" src="~/images/nodes/event-participant-updated.png" width="250px"> |
132 | 126 | </div> |
133 | 127 |
|
134 | 128 | ### On Active Speaker Change Event |
135 | 129 |
|
136 | | -This event is emitted when an active speaker has changed. See [](xref:DolbyIO.Comms.Services.ConferenceService.ActiveSpeakerChange) |
| 130 | +Emitted when an active speaker has [changed](xref:DolbyIO.Comms.Services.ConferenceService.ActiveSpeakerChange). |
137 | 131 |
|
138 | 132 | <div style="text-align:center"> |
139 | 133 | <img style="padding:25px 0" src="~/images/nodes/event-active-speaker.png" width="250px"> |
|
0 commit comments