Skip to content

Commit da2935d

Browse files
update Open Source Docs from Roblox internal teams
1 parent fdb299e commit da2935d

35 files changed

+574
-303
lines changed

content/common/navigation/engine/reference.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,6 +3298,11 @@ navigation:
32983298
type: engineapi
32993299
source: /reference/engine/enums/AdEventType.yaml
33003300
ignoreTranslation: true
3301+
- title: AdFormat
3302+
path: /reference/engine/enums/AdFormat
3303+
type: engineapi
3304+
source: /reference/engine/enums/AdFormat.yaml
3305+
ignoreTranslation: true
33013306
- title: AdornCullingMode
33023307
path: /reference/engine/enums/AdornCullingMode
33033308
type: engineapi
@@ -4918,6 +4923,11 @@ navigation:
49184923
type: engineapi
49194924
source: /reference/engine/enums/Severity.yaml
49204925
ignoreTranslation: true
4926+
- title: ShowAdResult
4927+
path: /reference/engine/enums/ShowAdResult
4928+
type: engineapi
4929+
source: /reference/engine/enums/ShowAdResult.yaml
4930+
ignoreTranslation: true
49214931
- title: SignalBehavior
49224932
path: /reference/engine/enums/SignalBehavior
49234933
type: engineapi

content/en-us/assets/scripting/input/Cross-Platform-Input-Detection-Mobile.png

Lines changed: 0 additions & 3 deletions
This file was deleted.

content/en-us/assets/scripting/input/Cross-Platform-Input-Detection-PC.png

Lines changed: 0 additions & 3 deletions
This file was deleted.

content/en-us/chat/bubble-chat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ if not bubbleImageLabel then
166166
bubbleImageLabel = Instance.new("ImageLabel")
167167
bubbleImageLabel.Parent = bubbleChatConfiguration
168168
end
169-
bubbleImageLabel.Image = "rbxassetid://6733332557"
169+
bubbleImageLabel.Image = "rbxassetid://109157529833093"
170170
bubbleImageLabel.ScaleType = Enum.ScaleType.Slice
171171
bubbleImageLabel.SliceCenter = Rect.new(40, 40, 320, 120)
172172
bubbleImageLabel.SliceScale = 0.5

content/en-us/cloud/open-cloud/oauth2-registration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ redirect URLs meet the following requirements:
8686
## Submitting for Review
8787

8888
To minimize the chances of malicious apps harming the community, registering an
89-
app doesn't make it publicly accessible. Instead, it remains in **private mode**
90-
with a limit of 100 authorized users. This mode is helpful for testing and
89+
app doesn't make it broadly accessible. Instead, it remains in **private mode**
90+
with a limit of 10 unique users. This mode is helpful for testing and
9191
debugging within your team.
9292

9393
If you want to extend the user base for your app, you need to publish it in

content/en-us/input/mobile.md

Lines changed: 22 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Over half of all Roblox sessions are played on mobile devices, so it's important
77

88
When designing a mobile experience, consider the [device orientation](#device-orientation) that you intend user's to use in your experience, then implement your inputs with `Class.ContextActionService` to perform the following mobile-related input tasks:
99

10-
- [Create on-screen buttons](#adding-mobile-buttons) visible only on mobile devices.
11-
- [Customize the mobile buttons and UI](#customizing-button-ui) to create a unique mobile experience.
10+
- [Create on-screen buttons](#custom-mobile-buttons) visible only on mobile devices.
1211
- [Setup context dependent inputs](#context-dependent-inputs) that allows the same button or input to perform a different action depending on the situation.
1312
- [Detect other input devices](#detecting-other-devices), such as a mouse or keyboard connected to a mobile tablet, to provide the correct on-screen prompts to the user.
1413

@@ -165,11 +164,9 @@ When `Class.StarterPlayer.AutoJumpEnabled` is enabled, the user's character auto
165164

166165
Disable `Class.StarterPlayer.AutoJumpEnabled` to disable this feature and force users to jump only using their key bindings.
167166

168-
## Adding Mobile Buttons
167+
## Custom Mobile Buttons
169168

170-
To add mobile buttons, use the `Class.ContextActionService:BindAction()` method.
171-
172-
The `Class.ContextActionService:BindAction()|BindAction()` method takes the following parameters:
169+
To add custom mobile buttons, use the `Class.ContextActionService:BindAction()` method which takes the following parameters:
173170

174171
<table>
175172
<thead>
@@ -181,25 +178,25 @@ The `Class.ContextActionService:BindAction()|BindAction()` method takes the foll
181178
</thead>
182179
<tbody>
183180
<tr>
184-
<td>actionName</td>
181+
<td>`actionName`</td>
185182
<td>string</td>
186183
<td>An identifier string for the action you are binding. You can use the actionName with other functions in `Class.ContextActionService` to edit the binding.</td>
187184
</tr>
188185
<tr>
189-
<td>functionToBind</td>
186+
<td>`functionToBind`</td>
190187
<td>function</td>
191188
<td>The function to call when the specified input is triggered. This function receives three arguments:
192189
<ul><li> A string equal to the actionName.</li>
193190
<li> A `Enum.UserInputState` which defines the input state when it called the function.</li>
194191
<li> The `Class.InputObject` used in the function call.</li></ul></td>
195192
</tr>
196193
<tr>
197-
<td>createTouchButton</td>
194+
<td>`createTouchButton`</td>
198195
<td>boolean</td>
199196
<td>When true, creates an on-screen button when the game is running on a mobile device.</td>
200197
</tr>
201198
<tr>
202-
<td>inputTypes</td>
199+
<td>`inputTypes`</td>
203200
<td>tuple</td>
204201
<td>The inputs you intend to bind to the function, such as enum values from a `Enum.KeyCode`.</td>
205202
</tr>
@@ -221,63 +218,30 @@ end
221218
ContextActionService:BindAction("Interact", handleAction, true, Enum.KeyCode.T, Enum.KeyCode.ButtonR1)
222219
```
223220

224-
### Removing Mobile Buttons
225-
226-
To remove a mobile button from the screen, call `Class.ContextActionService:UnbindAction()|UnbindAction()` using the actionName string you passed to `Class.ContextActionService:BindAction()|BindAction()`.
227-
228-
Use the following code sample to unbind the previously created Interact action:
229-
230-
```lua
231-
-- Unbind action by name
232-
ContextActionService:UnbindAction("Interact")
233-
```
234-
235-
## Customizing Button UI
236-
237-
You can use one of the several functions from `Class.ContextActionService` to customize the on-screen buttons that are created by `Class.ContextActionService:BindAction()|BindAction()`.
221+
<Alert severity="info">
222+
To remove a mobile button from the screen, call `Class.ContextActionService:UnbindAction()|UnbindAction()` using the `actionName` string you passed to `Class.ContextActionService:BindAction()|BindAction()`.
223+
</Alert>
238224

239-
### Button Text
225+
Once a custom button is added, you can use one of the several functions from `Class.ContextActionService` to customize the on-screen buttons that are created by `Class.ContextActionService:BindAction()|BindAction()`.
240226

241-
To change the text label for a mobile button, call `Class.ContextActionService:SetTitle()|SetTitle()` with the actionName string and a title:
227+
- To change the text label for a mobile button, call `Class.ContextActionService:SetTitle()|SetTitle()` with the `actionName` string and a title string.
228+
- To use a custom image just like other GUI buttons, call `Class.ContextActionService:SetImage()|SetImage()` method, replacing the example asset ID below with an image of your choice.
229+
- To set a button's position, call `Class.ContextActionService:SetPosition()|SetPosition()` with a `Datatype.UDim2` position value.
242230

243231
```lua
244232
-- Set button label to "Talk"
245233
ContextActionService:SetTitle("Interact", "Talk")
246-
```
247-
248-
### Button Image
249-
250-
Mobile buttons can use custom images just like other GUI buttons using the `Class.ContextActionService:SetImage()|SetImage()` method.
251-
252-
Use the following sample code to set a button image, replacing the asset ID with an image of your choice:
253-
254-
```lua
255234
-- Set button image
256-
ContextActionService:SetImage("Interact", "rbxassetid://0123456789")
257-
```
258-
259-
### Button Position
260-
261-
By default, a new button's position appears near the lower right section of the screen. You should carefully consider button placement on mobile devices and keep in mind the positions of thumbs and hands.
262-
263-
Use the following sample code to set a button's position with the `Class.ContextActionService:SetPosition()|SetPosition()` method:
264-
265-
```lua
235+
ContextActionService:SetImage("Interact", "rbxassetid://104919049969988")
266236
-- Set button position
267237
ContextActionService:SetPosition("Interact", UDim2.new(1, -70, 0, 10))
268238
```
269239

270-
## Context-Dependent Inputs
240+
### Context-Dependent Inputs
271241

272242
When developing for mobile devices you may often want to change what a single button does based on the context. Since screen space on mobile devices is limited, use contextual buttons that perform different actions based on what the character is able to do.
273243

274-
For example, you can display an active "Collect" button when the user is standing near a chest of gold:
275-
276-
<img
277-
src="../assets/scripting/input/Cross-Platform-Input-Detection-Mobile.png"
278-
width="80%" />
279-
280-
Use the following code sample to create a mobile button that is labelled "Collect" and is bound to the function collectTreasure():
244+
For example, you can display an active "Collect" button when the user is standing near a chest of gold, bound to the function `collectTreasure()`:
281245

282246
```lua
283247
local ContextActionService = game:GetService("ContextActionService")
@@ -289,45 +253,22 @@ local function collectTreasure(actionName, inputState, inputObject)
289253
end
290254

291255
ContextActionService:BindAction("Interact", collectTreasure, true, Enum.KeyCode.T, Enum.KeyCode.ButtonR1)
256+
ContextActionService:SetTitle("Interact", "Collect")
292257
ContextActionService:SetPosition("Interact", UDim2.new(1, -70, 0, 10))
293-
-- Set image to blue "Collect" button
294-
ContextActionService:SetImage("Interact", "rbxassetid://0123456789")
295258
```
296259

297-
At another point in the game, you can change the button to "Talk" when the user is standing near an NPC. Instead of adding and removing the existing button, you can simply use `Class.ContextActionService:BindAction()` on the existing Interact action, changing the function and button image.
298-
299-
Use the following code sample to set the existing button label to "Talk" and bind it to a function named talkToNPC():
260+
At another point during gameplay, you can change the button to "Talk" when the user is standing near an NPC. Instead of removing the existing button to place another, you can simply call `Class.ContextActionService:BindAction()|BindAction()` on the existing `"Interact"` action, changing the target function and button title:
300261

301262
```lua
302263
ContextActionService:BindAction("Interact", talkToNPC, true, Enum.KeyCode.T, Enum.KeyCode.ButtonR1)
303-
-- Set image to yellow "Talk" button
304-
ContextActionService:SetImage("Interact", "rbxassetid://0011223344")
264+
ContextActionService:SetTitle("Interact", "Talk")
305265
```
306266

307267
## Detecting Other Devices
308268

309-
In cross-platform experiences, it is necessary to know the user's current device in order to adjust the UI and display correct key binding prompts.
310-
311-
For example, if a user approaches a treasure chest and there's an action bound to collecting the gold, you can show mobile users an on-screen "Collect" button and desktop users an on-screen "T" key icon.
312-
313-
Keep in mind that a mobile device can also have a [mouse and keyboard](./mouse-and-keyboard.md) or [gamepad](./gamepad.md) plugged in. It is also possible that a desktop has a `Class.UserInputService.TouchEnabled|touchscreen` enabled. It is important to reference the user's preferred input options by displaying input options for the actively used device.
314-
315-
<GridContainer numColumns="2">
316-
<figure>
317-
<img src="../assets/scripting/input/Cross-Platform-Input-Detection-PC.png" />
318-
<figcaption>PC</figcaption>
319-
</figure>
320-
<figure>
321-
<img src="../assets/scripting/input/Cross-Platform-Input-Detection-Mobile.png" />
322-
<figcaption>Mobile</figcaption>
323-
</figure>
324-
</GridContainer>
325-
326-
In these cases, you can use `Class.UserInputService` to detect which input devices are enabled. If multiple input devices are enabled, use `Class.UserInputService:GetLastInputType()` to get the user's last used input device to display on the UI.
327-
328-
You can use the following `Class.ModuleScript`, placed within `Class.ReplicatedStorage` and renamed to **UserInputModule**, to fetch the user's input type, after which you can adapt the UI layout or context to your experience's specific needs.
269+
In cross-platform experiences, it's important to reference the user's preferred input options by displaying input options for the actively used device. For example, a mobile device can have a [mouse and keyboard](./mouse-and-keyboard.md) or [gamepad](./gamepad.md) connected, or it's possible that a desktop has a touchscreen enabled. If multiple input sources are enabled, you can use `Class.UserInputService:GetLastInputType()|GetLastInputType()` to get the user's last used input device.
329270

330-
Use the following `Class.ModuleScript` to check for enabled input devices and the last used input device:
271+
As a foundation, you can use the following `Class.ModuleScript`, placed within `Class.ReplicatedStorage` and renamed to **UserInputModule**, to fetch the user's input type, after which you can adapt the UI layout or context to your experience's specific needs.
331272

332273
```lua
333274
local UserInputService = game:GetService("UserInputService")

content/en-us/projects/assets/index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ description: An overview of how assets work on the platform.
55

66
Almost everything in Roblox is represented as a cloud-based asset with a unique corresponding ID. This ID is typically in the form of `rbxassetid://[ID]`, which gets applied to various instances as a property that's appropriate for that particular asset type. For example, `Class.Texture`, `Class.MeshPart`, and `Class.Sound` instances reference image, mesh, and audio assets through their respective `Class.Texture.TextureID|TextureID`, `Class.MeshPart.MeshID|MeshID`, and `Class.Sound.SoundID|SoundID` properties.
77

8-
<table>
9-
<tbody>
10-
<tr>
11-
<td><img src="../../assets/modeling/textures-decals/Texture-Example-Grafitti04.png" alt="A decal asset of a young woman with a button for an eye." width="90%" /></td>
12-
<td><img src="../../assets/modeling/meshes/Base-Mesh-In-Marketplace.png" alt="An untextured treasure chest MeshPart asset." width="90%" /></td>
13-
<td><audio controls><source src="../../assets/studio/general/Boom-Impact.mp3" type="audio/mpeg"></source></audio></td>
14-
</tr>
15-
<tr>
16-
<td><code>rbxassetid://7229442422</code></td>
17-
<td><code>rbxassetid://6768917255</code></td>
18-
<td><code>rbxassetid://9125402735</code></td>
19-
</tr>
20-
</tbody>
21-
</table>
8+
<GridContainer numColumns="3">
9+
<figure>
10+
`rbxassetid://7229442422`
11+
<img src="../../assets/modeling/textures-decals/Texture-Example-Grafitti04.png" alt="A decal asset of a young woman with a button for an eye." width="90%" />
12+
</figure>
13+
<figure>
14+
`rbxassetid://6768917255`
15+
<img src="../../assets/modeling/meshes/Base-Mesh-In-Marketplace.png" alt="An untextured treasure chest MeshPart asset." width="90%" />
16+
</figure>
17+
<figure>
18+
`rbxassetid://9125402735`
19+
<audio controls><source src="../../assets/studio/general/Boom-Impact.mp3" type="audio/mpeg"></source></audio>
20+
</figure>
21+
</GridContainer>
2222

2323
This cloud-based asset system allows you to store assets through Roblox and reuse them across the platform in various contexts, such as in different objects and places, without maintaining local copies as part of each saved Studio experience. You can find millions of project assets in the [Creator Store][CreatorMarketplaceURL], equip avatar assets in the [Marketplace][MarketplaceURL], or you can create your own assets and [import](#asset-management) them directly into Studio through the asset management tools.
2424

@@ -214,7 +214,7 @@ The content folder's location depends on the user's operating system:
214214
</tr>
215215
<tr>
216216
<td>`GameThumbnail`</td>
217-
<td>ID for an experience (`Class.DataModel.GameId`); shows the experience's primary [thumbnail](../../production/promotion/thumbnails.md)</td>
217+
<td>ID for an experience (`Class.DataModel.GameId`); shows the experience's primary [thumbnail](../../production/publishing/thumbnails.md)</td>
218218
<td scope="row">256&times;144, 384&times;216, 480&times;270, 576&times;324, 768&times;432</td>
219219
</tr>
220220
<tr>

content/en-us/projects/index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ objects are available and how to organize and use them, see
2424

2525
In Roblox, assets such as images, meshes, and audio are stored as **cloud-based assets**, so you don't need to bundle local copies into a saved Studio experience. Each asset in the cloud is assigned a unique **asset&nbsp;ID** from which multiple experiences can utilize them. You can create assets directly in Studio, such as models, or import assets like images, audio, and meshes from other tools.
2626

27-
<table>
28-
<tbody>
29-
<tr>
30-
<td><img src="../assets/modeling/textures-decals/Texture-Example-Grafitti04.png" alt="A decal asset of a young woman with a button for an eye." width="90%" /></td>
31-
<td><img src="../assets/modeling/meshes/Base-Mesh-In-Marketplace.png" alt="An untextured treasure chest MeshPart asset." width="90%" /></td>
32-
<td><audio controls><source src="../assets/studio/general/Boom-Impact.mp3" type="audio/mpeg"></source></audio></td>
33-
</tr>
34-
<tr>
35-
<td><code>rbxassetid://7229442422</code></td>
36-
<td><code>rbxassetid://6768917255</code></td>
37-
<td><code>rbxassetid://9125402735</code></td>
38-
</tr>
39-
</tbody>
40-
</table>
27+
<GridContainer numColumns="3">
28+
<figure>
29+
`rbxassetid://7229442422`
30+
<img src="../assets/modeling/textures-decals/Texture-Example-Grafitti04.png" alt="A decal asset of a young woman with a button for an eye." width="90%" />
31+
</figure>
32+
<figure>
33+
`rbxassetid://6768917255`
34+
<img src="../assets/modeling/meshes/Base-Mesh-In-Marketplace.png" alt="An untextured treasure chest MeshPart asset." width="90%" />
35+
</figure>
36+
<figure>
37+
`rbxassetid://9125402735`
38+
<audio controls><source src="../assets/studio/general/Boom-Impact.mp3" type="audio/mpeg"></source></audio>
39+
</figure>
40+
</GridContainer>
4141

4242
By default, assets are private to your experience and you can use an asset in any place by referencing its ID. You can also distribute them to the community in the [Creator Store](https://create.roblox.com/store/), so others can use them as well.
4343

0 commit comments

Comments
 (0)