mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 06:34:09 +00:00
update rules
This commit is contained in:
parent
4c390fdd37
commit
d5522b2fef
8549 changed files with 11783 additions and 1888 deletions
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Beta alert box
|
||||
---
|
||||
|
||||
<Alert severity="success">{props.leadIn}**File** ⟩ **Beta Features** ⟩ **{props.betaName}**{props.leadOut}</Alert>
|
||||
7
.cursor/rules/roblox/en-us/includes/cloud/legacy-note.md
Normal file
7
.cursor/rules/roblox/en-us/includes/cloud/legacy-note.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Legacy API with API key note
|
||||
---
|
||||
|
||||
<Alert severity="info">
|
||||
Legacy endpoints that support API key and/or OAuth 2.0 authentication have the same beta stability guarantees as the Open Cloud APIs. Breaking changes are possible but rare.
|
||||
</Alert>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Legacy API warning
|
||||
---
|
||||
|
||||
<Alert severity="warning">
|
||||
Legacy APIs with cookie authentication can incorporate breaking changes without notice. We don't recommend them for production applications.
|
||||
</Alert>
|
||||
219
.cursor/rules/roblox/en-us/includes/default-bindings.md
Normal file
219
.cursor/rules/roblox/en-us/includes/default-bindings.md
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
Roblox provides default input bindings for movement, camera control, and basic environment interaction — Roblox players are familiar with these controls, so you should only override them in specific cases. Also note that the **reserved** inputs cannot be overridden and will always operate with their intended purpose.
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="Roblox Reserved">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th width="23%">Mouse/Keyboard</th>
|
||||
<th width="23%">Gamepad</th>
|
||||
<th width="23%">Touch</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Open Roblox menu</td>
|
||||
<td><kbd>Esc</kbd></td>
|
||||
<td><kbd>Start</kbd> button (`Enum.KeyCode|ButtonStart`)</td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[Developer Console](../studio/developer-console.md)</td>
|
||||
<td><kbd>F9</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fullscreen mode (Windows)<br />Show desktop (Mac)</td>
|
||||
<td><kbd>F11</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Record video (Windows)</td>
|
||||
<td><kbd>F12</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Take screenshot</td>
|
||||
<td><kbd>PrintScreen</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</TabItem>
|
||||
<TabItem label="Character">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th width="23%">Mouse/Keyboard</th>
|
||||
<th width="23%">Gamepad</th>
|
||||
<th width="23%">Touch</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Move forward</td>
|
||||
<td><kbd>W</kbd> <kbd>↑</kbd></td>
|
||||
<td>Press up on primary thumbstick</td>
|
||||
<td>Press up on virtual thumbstick</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Move backward</td>
|
||||
<td><kbd>S</kbd> <kbd>↓</kbd></td>
|
||||
<td>Press down on primary thumbstick</td>
|
||||
<td>Press down on virtual thumbstick</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Move left</td>
|
||||
<td><kbd>A</kbd></td>
|
||||
<td>Press left on primary thumbstick</td>
|
||||
<td>Press left on virtual thumbstick</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Move right</td>
|
||||
<td><kbd>D</kbd></td>
|
||||
<td>Press right on primary thumbstick</td>
|
||||
<td>Press right on virtual thumbstick</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jump</td>
|
||||
<td><kbd>Space</kbd></td>
|
||||
<td><img src="../assets/publishing/cross-platform/ButtonA-Xbox.png" width="20" /> <img src="../assets/publishing/cross-platform/ButtonA-PS.png" width="20" /></td>
|
||||
<td>Tap virtual jump button</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</TabItem>
|
||||
<TabItem label="Interface / Inventory">
|
||||
<Alert severity="info">
|
||||
The following action inputs are reserved unless you [disable the respective feature](../players/disable-ui.md).
|
||||
</Alert>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th width="23%">Mouse/Keyboard</th>
|
||||
<th width="23%">Gamepad</th>
|
||||
<th width="23%">Touch</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Open text chat</td>
|
||||
<td><kbd>/</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Show/hide players list</td>
|
||||
<td><kbd>Tab</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Toggle backpack</td>
|
||||
<td><kbd>`</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Equip/unequip tools</td>
|
||||
<td><kbd>0</kbd>-<kbd>9</kbd></td>
|
||||
<td>Swap between tools using front‑left and front‑right triggers (`Enum.KeyCode.ButtonL1|ButtonL1` and `Enum.KeyCode.ButtonR1|ButtonR1`)</td>
|
||||
<td>Tap on-screen tool icons</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Use equipped tool</td>
|
||||
<td>Click left mouse button</td>
|
||||
<td>Back‑right trigger (`Enum.KeyCode.ButtonR2|ButtonR2`)</td>
|
||||
<td>Tap on screen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Drop equipped tool</td>
|
||||
<td><kbd>Backspace</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Toggle **UI selection** mode¹</td>
|
||||
<td><kbd>\</kbd></td>
|
||||
<td><kbd>Select</kbd> button (`Enum.KeyCode.ButtonSelect|ButtonSelect`)</td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Navigate among interactive UI elements while in **UI selection** mode</td>
|
||||
<td><kbd>↑</kbd> <kbd>↓</kbd> <kbd>←</kbd> <kbd>→</kbd><br /><kbd>W</kbd> <kbd>S</kbd> <kbd>A</kbd> <kbd>D</kbd></td>
|
||||
<td>Primary thumbstick (`Enum.KeyCode.Thumbstick1|Thumbstick1`) or D‑pad (`Enum.KeyCode.DPadUp|DPadUp`; `Enum.KeyCode.DPadDown|DPadDown`; `Enum.KeyCode.DPadLeft|DPadLeft`; `Enum.KeyCode.DPadRight|DPadRight`)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Activate an interactive UI element while in **UI selection** mode</td>
|
||||
<td><kbd>Enter</kbd></td>
|
||||
<td>Back‑right trigger (`Enum.KeyCode.ButtonR2|ButtonR2`)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Scroll up/down/left/right in selected `Class.ScrollingFrame` while in **UI selection** mode</td>
|
||||
<td><kbd>PageUp</kbd><br /><kbd>PageDown</kbd><br /><kbd>Home</kbd><br /><kbd>End</kbd></td>
|
||||
<td>Secondary thumbstick (`Enum.KeyCode.Thumbstick2|Thumbstick2`)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<figcaption>¹ If `Class.GuiService.GuiNavigationEnabled|GuiNavigationEnabled` is enabled (default)</figcaption>
|
||||
|
||||
</TabItem>
|
||||
<TabItem label="Camera">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th width="23%">Mouse/Keyboard</th>
|
||||
<th width="23%">Gamepad</th>
|
||||
<th width="23%">Touch</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Move camera view around</td>
|
||||
<td>While holding right mouse button</td>
|
||||
<td>Move secondary thumbstick</td>
|
||||
<td>Touch-drag around screen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zoom camera in/out</td>
|
||||
<td>Mouse scroll wheel<br /><kbd>I</kbd>/<kbd>O</kbd></td>
|
||||
<td>Press secondary thumbstick</td>
|
||||
<td>Pinch in/out on screen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rotate camera left or right</td>
|
||||
<td><kbd>←</kbd> <kbd>→</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Toggle mouse lock²</td>
|
||||
<td><kbd>Shift</kbd></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
<td><Typography color="disabled">N/A</Typography></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<figcaption>² If `Class.StarterPlayer.EnableMouseLockOption|EnableMouseLockOption` is enabled (default)</figcaption>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: Open the Developer Console
|
||||
---
|
||||
|
||||
You can open the console during a testing or live experience session using any of the following ways:
|
||||
|
||||
- Press <kbd>F9</kbd>.
|
||||
- Type `/console` into the chat.
|
||||
- Use the in-experience menu:
|
||||
1. Open the in-experience **Roblox Menu**.
|
||||
|
||||
<img src="../../assets/ui/misc/Roblox-Menu-Button.png" width="680" />
|
||||
|
||||
2. Select the **Settings** tab.
|
||||
3. Scroll down to **Developer Console** and click **Open**.
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
The following Luau code sample demonstrates how to, after a player equips a fishing pole, listen for user input (in this case, the <kbd>E</kbd> key) and call additional functions:
|
||||
|
||||
```lua
|
||||
local ContextActionService = game:GetService("ContextActionService")
|
||||
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
||||
|
||||
-- Get a module script from ReplicatedStorage that returns a single function
|
||||
local performSomeAction = require(ReplicatedStorage.performSomeAction)
|
||||
|
||||
-- Assumes that this script is a child of the fishing pole
|
||||
local fishingPole = script.Parent
|
||||
local ACTION_CAST = "Cast"
|
||||
|
||||
-- Check that the key is down, then call another function
|
||||
local function castLine(_actionName, inputState, _inputObject)
|
||||
if inputState == Enum.UserInputState.Begin then
|
||||
performSomeAction()
|
||||
end
|
||||
end
|
||||
|
||||
-- Only enable the action when the player equips the fishing pole
|
||||
fishingPole.Equipped:Connect(function()
|
||||
ContextActionService:BindAction(ACTION_CAST, castLine, true, Enum.KeyCode.E)
|
||||
end)
|
||||
|
||||
-- Disable the action when the player unequips the fishing pole
|
||||
fishingPole.Unequipped:Connect(function()
|
||||
ContextActionService:UnbindAction(ACTION_CAST)
|
||||
end)
|
||||
```
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
Location | Description
|
||||
:--- | :---
|
||||
`Class.Workspace` | Represents the experience's 3D world. This location works well for server scripts that attach directly to objects and control their behavior.
|
||||
`Class.ReplicatedFirst` | Contains objects that replicate to the client before anything else. This location is ideal for the absolute minimum set of objects and client scripts necessary to display a loading screen.
|
||||
`Class.ReplicatedStorage` | Contains objects that are replicated to both the client and the server. This location is ideal for `Class.ModuleScript\|ModuleScripts` that you want to use on both the server and the client. `Class.LocalScript\|LocalScripts` do not run from this location, but `Class.Script\|Scripts` with a `Class.BaseScript.RunContext\|RunContext` of `Enum.RunContext\|Client` do.
|
||||
`Class.ServerScriptService` | Contains server scripts. This location is ideal for scripts that need to access server-side functionality or objects, such as game logic and cloud storage.
|
||||
`Class.ServerStorage` | Contains server-side objects. This location is ideal for large objects that don't need to be immediately replicated to clients when they join an experience. Scripts do not run from this location, but you can store server-side `Class.ModuleScript\|ModuleScripts` here.
|
||||
`Class.StarterPlayer` ⟩ `Class.StarterCharacterScripts` | Contains `Class.LocalScript\|LocalScripts` that run when the character spawns.
|
||||
`Class.StarterPlayer` ⟩ `Class.StarterPlayerScripts` | Contains general-purpose `Class.LocalScript\|LocalScripts` that run when the player joins the experience.
|
||||
`Class.StarterGui` | Contains GUI elements that the client displays when it loads the experience. `Class.LocalScript\|LocalScripts` can run from this location. This location is ideal for scripts that modify the experience's user interface, such as adding buttons, menus, and pop-ups.
|
||||
`Class.StarterPack` | Generally only contains `Class.Tool\|Tools`, but can also include `Class.LocalScript\|LocalScripts` for setting up player backpacks.
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
Roblox experiences support three different types of Luau scripts:
|
||||
|
||||
- **Client scripts**
|
||||
|
||||
These scripts run on the client, and the server has no visibility into their behavior. For legacy reasons, these scripts can take the form of `Class.LocalScript|LocalScripts` or `Class.Script|Scripts` with a `Class.BaseScript.RunContext|RunContext` value of `Enum.RunContext|Client`. Client scripts typically live in `Class.ReplicatedStorage`, `Class.StarterPlayerScripts`, or `Class.StarterCharacterScripts`.
|
||||
|
||||
- **Server scripts**
|
||||
|
||||
These scripts run on the server, and the client has no visibility into their behavior. Server scripts have a `Class.BaseScript.RunContext|RunContext` value of `Enum.RunContext|Server` and typically live in `Class.ServerScriptService`, the contents of which are not replicated to the client.
|
||||
|
||||
- **Module scripts**
|
||||
|
||||
These scripts are reusable pieces of code that return exactly one value, typically a function or table (or a table of functions). Rather than duplicating code in client and server scripts, use module scripts to share code and data between the two. Module scripts often live in `Class.ReplicatedStorage`, but can live elsewhere if you want to share code between scripts on the same side of the client-server boundary.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
{props.engine}'s transforms and Roblox's `Datatype.CFrame|CFrames` serve similar purposes in representing 3D transformations of objects:
|
||||
|
||||
- Both transforms and `Datatype.CFrame|CFrames` represent the position and rotation of an object in 3D space. Transforms include scale, whereas Roblox uses a `Class.BasePart.Size` property that isn't part of the `Datatype.CFrame`.
|
||||
- Both support multiplication for complex transformations and have built-in methods for other manipulations.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
The **Experience Notifications** table displays detailed performance statistics for each notification with at least 100 impressions, ordered by the date of first impression for that notification.
|
||||
|
||||
<img src="../../assets/open-cloud/experience-notifications/Analytics-Itemized.png" width="880" />
|
||||
|
||||
The **Name** column is the key identifier for the notification. By default, the name matches the identifier name you specified when [creating the notification string](#create-a-notification-string), but you can override it through the `category` field in your API calls, in which case `category` overrides the name. Changing the string name in the [Creator Dashboard](https://create.roblox.com/dashboard/creations) or changing the string your message ID references in the API call will generate a new row in the table.
|
||||
|
||||
If you'd like to A/B test the performance of different strings, it's recommended that you create an entirely new notification string with a similar name, for example:
|
||||
|
||||
- **EggHatchA** — "Your gold egg has hatched! Come meet your new pet."
|
||||
- **EggHatchB** — "It's hatching time! Come meet your new pet."
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
The summary section serves as a snapshot of the aggregate performance of your notifications. A minimum of 100 aggregate impressions is required to display the performance statistics.
|
||||
|
||||
<img src="../../assets/open-cloud/experience-notifications/Analytics-Summary.png" width="880" />
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Statistic</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>**Opted-in Users**</td>
|
||||
<td>The total number of users that have turned on notifications for your experience. Please note that this does include users under the age of 13 who are only able to receive notification of [experience updates](../../production/promotion/experience-events.md#announce-experience-updates), not personalized [experience notifications](../../production/promotion/experience-notifications.md).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Impressions**</td>
|
||||
<td>The total number of user impressions all of your notifications have received in aggregate.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Clicks**</td>
|
||||
<td>The total number of clicks all of your notifications have received in aggregate.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**CTR**</td>
|
||||
<td>The rate at which users are clicking on your notifications, calculated as the ratio of clicks to impressions.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Turn Off**</td>
|
||||
<td>The rate at which users are turning off notifications for your experience directly from your notifications, calculated as the ratio of turn off actions to impressions.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Dismiss**</td>
|
||||
<td>The rate at which users are dismissing your notifications, calculated as the ratio of dismiss actions to impressions.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
Performance of your notifications and notifiable audience are displayed in the **Analytics** tab of the **Notifications** page where you [configure notification strings](#create-a-notification-string) (simply tab from **Creations** to **Analytics**).
|
||||
|
||||
1. Navigate to the [Creator Dashboard](https://create.roblox.com/dashboard/creations).
|
||||
1. Similar to [badges](../../production/publishing/badges.md), notification strings are tied to a **specific experience**. Locate that experience's thumbnail and click on it.
|
||||
1. In the left column, under **Engagement**, click **Notifications**.
|
||||
1. On the target page, click the **Analytics** tab to switch to the analytics dashboard.
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
A spam prevention system exists to ensure the quality of notifications for users and protect the shared notification channel for all developers. Because of this, delivery of notifications is not guaranteed. This spam prevention system is directly informed by user engagement: the more users engage with your notifications, the more reach they'll receive. You can transparently track engagement metrics in the analytics dashboard, as explained below.
|
||||
|
||||
Experience notifications have a static throttle limit; each user can receive one notification per day from a given experience, and you receive transparent feedback when a user's throttle limit is reached.
|
||||
|
||||
Additionally, the following list outlines some of the special cases which may result in **non‑delivery** of a notification:
|
||||
|
||||
- Experience **eligibility requirements** are not met.
|
||||
- Recipient is not opted in to notifications from your experience.
|
||||
- Recipient's throttle limit for your experience has been reached.
|
||||
- Recipient's aggregate daily throttle limit has been reached.
|
||||
- Missing or invalid request parameters.
|
||||
- Notification string was moderated.
|
||||
- For notifications with user mentions, non-delivery occurs if either of these conditions are met:
|
||||
- The receiver and mentioned user are not connections.
|
||||
- The mentioned user has **No** selected for "Update connections about my activity?" under **Privacy** → **Other Settings** in their Roblox account settings.
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
In order to use the APIs to send notifications, the experience must meet the following base criteria:
|
||||
|
||||
- Minimum 100 visits since launch.
|
||||
- The experience must not be under moderation.
|
||||
- You as the developer must have permission to manage the experience.
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
<BaseAccordion>
|
||||
<AccordionSummary>
|
||||
<Typography variant="subtitle2">Best practices</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
Notifications should be **personalized** to the receiver and should be based on in‑experience activity that's specifically relevant to the user. Inversely, notifications should not be of a generic, advertising nature.
|
||||
|
||||
<Alert severity="success">
|
||||
<Typography variant="subtitle2">You're 2 races away from completing the weekly challenge!</Typography>
|
||||
</Alert>
|
||||
|
||||
<Alert severity="error">
|
||||
<Typography variant="subtitle2">A new line of race cars just dropped in Race Car Craze. Check them out!</Typography>
|
||||
</Alert>
|
||||
|
||||
Ideally, notifications should also alert users of something they can take **immediate action** on. Avoid purely informational notifications that do not prompt a direct response or action.
|
||||
|
||||
<Alert severity="success">
|
||||
<Typography variant="subtitle2">Allie @LaterSk8er1 just beat your record on the Tokyo Tour track! Time for revenge?</Typography>
|
||||
</Alert>
|
||||
|
||||
<Alert severity="error">
|
||||
<Typography variant="subtitle2">It's been a few days since you participated in a race with Allie @LaterSk8er1.</Typography>
|
||||
</Alert>
|
||||
</AccordionDetails>
|
||||
</BaseAccordion>
|
||||
|
||||
<BaseAccordion>
|
||||
<AccordionSummary>
|
||||
<Typography variant="subtitle2">Respect community standards</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
All notification content and behaviors are subject to Roblox's [Community Standards](https://en.help.roblox.com/hc/en-us/articles/203313410-Roblox-Community-Standards) and platform‑wide [text filtering](../../ui/text-filtering.md), regardless of your experience's [age guidelines](../../production/promotion/experience-guidelines.md). This means that if your experience is a 17+ experience, your notifications are still subject to the platform‑wide standards, **not** the [17+ Policy Standards](https://en.help.roblox.com/hc/en-us/articles/15869919570708).
|
||||
</AccordionDetails>
|
||||
</BaseAccordion>
|
||||
|
||||
<BaseAccordion>
|
||||
<AccordionSummary>
|
||||
<Typography variant="subtitle2">Avoid deceptive nudge tactics</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
Notification content is **not** permitted to incorporate dark patterns or other tactics that manipulate or deceive users into making choices they don't intend, or which may be counter to their best interests. This could include the following:
|
||||
|
||||
- **Disguised Ads** — Notifications that are intentionally disguised as organic content, but are actually advertising. For example, assume that clicking the following notification leads to Petz World but no "important information" is displayed.
|
||||
|
||||
<Alert severity="error">
|
||||
<Typography variant="subtitle2">Click here for important information about your Petz World account.</Typography>
|
||||
</Alert>
|
||||
|
||||
- **Time Pressured Actions** — Notifications that pressure users into clicking, subscribing, consenting, or purchasing through applying false time pressure.
|
||||
|
||||
<Alert severity="error">
|
||||
<Typography variant="subtitle2">Make a purchase in Petz World in the next 10 minutes to avoid missing out on important gameplay updates!</Typography>
|
||||
</Alert>
|
||||
|
||||
- **Bait-and-Switch with Free Items or Other Rewards** — Notifications that falsely tell users that they'll receive something for free when it's not. For example, upon clicking the following notification, it becomes clear that something further is required to get the gift.
|
||||
|
||||
<Alert severity="error">
|
||||
<Typography variant="subtitle2">Play Petz World now and get a free dog bed!</Typography>
|
||||
</Alert>
|
||||
|
||||
- **Tricking Users Into Purchasing** — Notifications that trick users into making unintended purchases. For example, assume that clicking the following notification leads directly to a purchase system pre‑loaded with items that the user didn't choose to buy.
|
||||
|
||||
<Alert severity="error">
|
||||
<Typography variant="subtitle2">Check out our new Petz in Petz World!</Typography>
|
||||
</Alert>
|
||||
|
||||
</AccordionDetails>
|
||||
</BaseAccordion>
|
||||
|
||||
<BaseAccordion>
|
||||
<AccordionSummary>
|
||||
<Typography variant="subtitle2">Do not gate gameplay</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
Experiences should **not** require users to turn on notifications in order to participate or advance in gameplay.
|
||||
</AccordionDetails>
|
||||
</BaseAccordion>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
As with [Player Invite Prompts](../../production/promotion/invite-prompts.md), you must create and edit your notification strings in the [Creator Dashboard](https://create.roblox.com/dashboard/creations). **There is no default experience notification string, so this step is required.**
|
||||
|
||||
1. Navigate to the [Creator Dashboard](https://create.roblox.com/dashboard/creations).
|
||||
1. Similar to [badges](../../production/publishing/badges.md), notification strings are tied to a **specific experience**. Locate that experience's thumbnail and click on it.
|
||||
1. In the left column, under **Engagement**, click **Notifications**.
|
||||
1. In the center region, click the **Create a Notification String** button.
|
||||
1. Fill in an identifier name (only visible to you) and the custom notification string; this is limited to 99 characters and can include unlimited [custom parameters](#customize-notifications-using-parameters). Notifications will automatically use the title of your experience as the notification title, but you can additionally use **\{experienceName\}** to reference your experience in the notification body text.
|
||||
|
||||
Example notification strings:
|
||||
|
||||
<p><Chip label="You're {numQuests} quests away from completing the weekly challenge!" size="large" color="primary" variant="outlined" /></p>
|
||||
<p><Chip label="Your {eggName} hatched! Come meet your new pet." size="large" color="primary" variant="outlined" /></p>
|
||||
<p><Chip label="You won {numRaces} races this week and unlocked the {racetrackName} track!" size="large" color="primary" variant="outlined" /></p>
|
||||
<p><Chip label="{userId-friend} just beat your record on the Tokyo Tour track! Time for revenge?" size="large" color="primary" variant="outlined" /></p>
|
||||
|
||||
<Alert severity="warning">
|
||||
Before writing notification strings, please review the [guidelines](#usage-guidelines) for using the system.
|
||||
</Alert>
|
||||
|
||||
1. When ready, click the **Create Notification String** button.
|
||||
1. On the notifications page, in the table of notifications, click the **⋯** button in the **Actions** column and select **Copy Asset ID**.
|
||||
1. Use the copied ID for the `messageId` key value in the `payload` table as demonstrated in the [example script](#send-an-experience-notification).
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
**Experience notifications** are a way for [opted-in](https://en.help.roblox.com/hc/en-us/articles/24769602332692-Out-of-Experience-Notifications) users age 13+ to keep up with their favorite experiences through timely, personalized notifications. As the developer, you can determine what kinds of in‑experience activities are most important to notify your users about, as well as define the notification content.
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="Async Activity">
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid item>
|
||||
<img src="../../assets/open-cloud/experience-notifications/Example-Notification-A.png" width="369" height="134" alt="Example notification" />
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<img src="../../assets/open-cloud/experience-notifications/Example-Notification-D.png" width="369" height="134" alt="Example notification" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</TabItem>
|
||||
<TabItem label="Progress / Achievement">
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid item>
|
||||
<img src="../../assets/open-cloud/experience-notifications/Example-Notification-C.png" width="369" height="134" alt="Example notification" />
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<img src="../../assets/open-cloud/experience-notifications/Example-Notification-E.png" width="369" height="134" alt="Example notification" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</TabItem>
|
||||
<TabItem label="User Mentions">
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid item>
|
||||
<img src="../../assets/open-cloud/experience-notifications/Example-Notification-B.png" width="369" height="134" alt="Example notification" />
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<img src="../../assets/open-cloud/experience-notifications/Example-Notification-F.png" width="369" height="134" alt="Example notification" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</TabItem>
|
||||
</Tabs><br />
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
import BetaAlert from '../beta-features/beta-alert.md'
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Keys/Shortcuts</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><kbd>W</kbd> <kbd>A</kbd> <kbd>S</kbd> <kbd>D</kbd></td>
|
||||
<td>Moves the camera forward/left/back/right.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>Q</kbd> <kbd>E</kbd></td>
|
||||
<td>Moves the camera down/up.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>Shift</kbd></td>
|
||||
<td>In combination with any movement key, changes the camera speed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>F</kbd></td>
|
||||
<td>Focuses the camera on a selected part.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Right Mouse Button**</td>
|
||||
<td>When pressed, dragging the mouse moves the camera view around.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span style={{lineHeight: '150%'}}>**Mouse Scroll Wheel**<br /><kbd>Ctrl</kbd><kbd>=</kbd> or <kbd>⌘</kbd><kbd>=</kbd><br /><Typography noWrap><kbd>Ctrl</kbd><kbd>-</kbd> or <kbd>⌘</kbd><kbd>-</kbd> or <kbd>O</kbd></Typography></span></td>
|
||||
<td><span style={{lineHeight: '150%'}}>Zooms the camera in or out.<br />Zooms the camera in.<br />Zooms the camera out.</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>,</kbd> / <kbd>.</kbd></td>
|
||||
<td>Rotates the camera left/right. If a part/model is in focus via the <kbd>F</kbd> shortcut, rotates the camera counterclockwise/clockwise around that focused object.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Middle Mouse Button**</td>
|
||||
<td>When pressed, dragging the mouse pans the camera.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Right Mouse Button** & **Mouse Scroll Wheel**</td>
|
||||
<td>Pressing the right mouse button and scrolling the mouse wheel **up** increases the camera scroll speed. Conversely, pressing the right mouse button and scrolling the mouse wheel **down** reduces the camera scroll speed.<BetaAlert betaName="New Studio Camera Controls" leadIn="This feature is currently in beta. Enable it through " leadOut="." components={props.components} /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
To simulate physics while [moving](../../parts/index.md#move) or [rotating](../../parts/index.md#rotate) parts, you can switch from **Geometric** mode to **Physical** mode in Studio's toolbar, effectively forcing parts to obey physical limitations. For example, if two parts are attached by a `Class.RopeConstraint` and you drag one part around the scene, the other part will follow as the rope becomes taut.
|
||||
|
||||
<img src="../../assets/studio/general/Toolbar-Mode-Physical.png" width="800" />
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
To accurately visualize constraints in Studio, you can toggle the following from the **View** menu or through the respective shortcut:
|
||||
|
||||
- **Show Welds** (<kbd>Alt</kbd><kbd>W</kbd> or <kbd>⌥</kbd><kbd>W</kbd>) — Show `Class.WeldConstraint|WeldConstraints` separately from the visualization of other constraints.
|
||||
- **Show Constraint Details** (<kbd>Alt</kbd><kbd>D</kbd> or <kbd>⌥</kbd><kbd>D</kbd>) — Show complete visual details of non-weld constraints.
|
||||
|
||||
<Alert severity="success">
|
||||
In addition to the above visualization, you can view colored outlines around mechanisms (groups of parts that share simulation step and [network ownership](../../physics/network-ownership.md)) by toggling on **Mechanisms** from the [Visualization Options](../../studio/ui-overview.md#visualization-options) widget in the upper‑right corner of the 3D viewport.
|
||||
</Alert>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
The **Controller Emulator**, accessible from Studio's **Test** menu, lets you accurately emulate gamepad input directly in Studio. The default controller is a generic gamepad, but you can select alternatives from the upper‑left picker menu.
|
||||
|
||||
<img src="../../assets/studio/general/Controller-Emulator.png" width="720" alt="View of the generic controller in the Controller Emulator." />
|
||||
|
||||
While playtesting, you can control the experience with the virtual controller using your mouse.
|
||||
|
||||
You can also click **Edit mappings** in the upper‑right corner to view and edit key mappings for the virtual controller, for example <kbd>E</kbd> to `Enum.KeyCode.ButtonL2|ButtonL2` or <kbd>9</kbd> to `Enum.KeyCode.ButtonA|ButtonA`. These mappings are saved like other Studio settings (per controller, per user, per computer) and are translated to gamepad events in both the emulator window and the 3D viewport.
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
The **Device Emulator**, accessible from Studio's **Test** menu, lets you emulate various devices directly in Studio, providing insight into how controls work on mobile devices, consoles, and VR headsets, as well as how [on‑screen UI](../../ui/on-screen-containers.md) elements display on different screen resolutions and aspect ratios.
|
||||
|
||||
In emulation mode, you can select devices from the **device selector** dropdown menu above the 3D viewport to emulate less powerful devices and test [streaming‑enabled](../../workspace/streaming.md) experiences where 3D content dynamically loads and unloads based on available memory. You can also adjust the **view size** and change the **orientation** between landscape and portrait modes.
|
||||
|
||||
<img src="../../assets/studio/general/Editor-Window-Emulation-Options.png" width="840" alt="Emulation options above the 3D viewport" />
|
||||
30
.cursor/rules/roblox/en-us/includes/studio/playtest-modes.md
Normal file
30
.cursor/rules/roblox/en-us/includes/studio/playtest-modes.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Mode</th>
|
||||
<th>Shortcut</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>**Test**</td>
|
||||
<td><kbd>F5</kbd></td>
|
||||
<td>Starts simulating the experience, inserting your avatar at either a `Class.SpawnLocation` or coordinates of around <Typography noWrap>`(0, 100, 0)`</Typography>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Test Here**</td>
|
||||
<td></td>
|
||||
<td>Starts simulating the experience, inserting your avatar in front of the camera's current position.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Run**</td>
|
||||
<td><kbd>F8</kbd></td>
|
||||
<td>Starts simulating the experience but does not insert your avatar. The simulation begins at the current camera position and you can navigate around using the Studio camera controls.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
30
.cursor/rules/roblox/en-us/includes/studio/system-reqs.md
Normal file
30
.cursor/rules/roblox/en-us/includes/studio/system-reqs.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
<table style={{width: '75%'}} size="small">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><Chip label="MINIMUM" size="medium" color="warning" variant="outlined" /></th>
|
||||
<th><Chip label="RECOMMENDED" size="medium" color="success" variant="outlined" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>**OS Version**</td>
|
||||
<td>Windows 10<br />macOS 10.14</td>
|
||||
<td>Windows 11<br />macOS 14+</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Memory (RAM)**</td>
|
||||
<td>3 GB</td>
|
||||
<td>8 GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>**Resolution**</td>
|
||||
<td></td>
|
||||
<td>1600×900 or higher</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
1. In the top-left corner, click the category selector dropdown and choose an asset category. Optionally click the **advanced filter** button to filter results by [verified creator](../../production/publishing/account-verification.md) status, a specific creator, the sale price for [plugins](../../studio/plugins.md), and file length for [audio assets](../../audio/assets.md).
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid item>
|
||||
<img src="../../assets/studio/toolbox/Creator-Store-Category-Selector.png" width="360" alt="The Toolbox window with the category selector highlighted" />
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<img src="../../assets/studio/toolbox/Creator-Store-Advanced-Filter.png" width="360" alt="The Toolbox window with the advanced filter highlighted" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
2. In the search field, type what you want to find and press <kbd>Enter</kbd>. The view curates a selection of assets according to your query.
|
||||
|
||||
<img src="../../assets/studio/toolbox/Model-Search-Example.png" width="360" />
|
||||
|
||||
3. <Chip label="OPTIONAL" size="small" variant="outlined" /> Hover over an asset thumbnail and click the magnifying glass icon to closely inspect the asset's community rating, description, and more.
|
||||
|
||||
<img src="../../assets/studio/toolbox/Asset-Inspect-Icon.png" width="400" alt="A preview view of an asset with the inspect icon highlighted." />
|
||||
|
||||
4. To add an asset to an experience:
|
||||
|
||||
- If the asset is a [model](../../parts/models.md), [mesh](../../parts/meshes.md), [decal](../../parts/textures-decals.md), [video](../../ui/video-frames.md), or [audio](../../audio/assets.md) asset, click it or drag‑and‑drop it into the 3D viewport. It then inserts into the [Explorer](../../studio/explorer.md) hierarchy, and assets with 3D content display in the viewport.
|
||||
- If the asset is a [plugin](../../studio/plugins.md), click it and use the **Install** button to add it to the mezzanine's **Plugins** tab.
|
||||
- If the asset is a font, click it and use the **Install** button to add it to your font library. It then becomes available for user interface elements such as [text labels](../../ui/labels.md) or [buttons](../../ui/buttons.md).
|
||||
|
||||
<Alert severity="info">
|
||||
Some assets include scripts that perform specific actions, such as animating at runtime or triggering a sound. If you want to use an asset without allowing any of its scripts to run, right‑click the object in the [Explorer](../../studio/explorer.md) window and select **Disable Scripts** from the context menu.
|
||||
</Alert>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
Applied to various sources and inputs, [text filtering](../../ui/text-filtering.md) prevents users from seeing inappropriate language and personally identifiable information such as phone numbers. Roblox automatically filters common text outputs such as messages that have passed through [in-experience text chat](../../chat/in-experience-text-chat.md), but **you are responsible for filtering any displayed text that you don't have explicit control over**, including {props.context}.
|
||||
|
||||
<Alert severity="error">
|
||||
Because filtering is crucial for a safe environment, Roblox actively moderates the content of experiences to make sure they meet [community standards](https://en.help.roblox.com/hc/en-us/articles/203313410-Roblox-Community-Standards). If Roblox receives reports or automatically detects that your experience doesn't apply text filtering, then the system removes the experience until you add filtering.
|
||||
</Alert>
|
||||
68
.cursor/rules/roblox/en-us/includes/ui/default-ui.md
Normal file
68
.cursor/rules/roblox/en-us/includes/ui/default-ui.md
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
All Roblox experiences include several UI elements that are enabled by default. If you don't need any of these elements or if you want to replace them with your own creations, you can use the `Class.StarterGui:SetCoreGuiEnabled()|SetCoreGuiEnabled()` method in a client‑side script with the associated `Enum.CoreGuiType` option.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Default UI</th>
|
||||
<th>Associated enum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Dynamically updated `Class.Players` list, commonly used as a [leaderboard](../../players/leaderboards.md).</td>
|
||||
<td>`Enum.CoreGuiType.PlayerList`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>The character's `Class.Humanoid.Health|Health` bar. Does not appear if the character's `Class.Humanoid` is at full health.</td>
|
||||
<td>`Enum.CoreGuiType.Health`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>The character's `Class.Backpack` which contains [in‑experience tools](../../players/tools.md). Does not appear if there are no `Class.Tool|Tools` in the backpack.</td>
|
||||
<td>`Enum.CoreGuiType.Backpack`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>The [text chat](../../chat/in-experience-text-chat.md) window.</td>
|
||||
<td>`Enum.CoreGuiType.Chat`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Popup menu of character [emotes](../../characters/emotes.md).</td>
|
||||
<td>`Enum.CoreGuiType.EmotesMenu`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A window displaying a player's perspective or view of their own character. Does not appear unless the player has enabled **Self View** from the Roblox menu.</td>
|
||||
<td>`Enum.CoreGuiType.SelfView`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A **capture screenshot** button along the right side of the screen. Does not appear unless the player has enabled **Captures** from the Roblox menu.</td>
|
||||
<td>`Enum.CoreGuiType.Captures`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>The **Avatar Switcher** allows users to change their platform avatar.</td>
|
||||
<td>`Enum.CoreGuiType.AvatarSwitcher`</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<img src="../../assets/ui/misc/CoreGui-Elements.jpg" width="840" alt="Core UI elements in every Roblox experience." />
|
||||
|
||||
```lua title="Client Script - Disable Default UI Elements"
|
||||
local StarterGui = game:GetService("StarterGui")
|
||||
|
||||
-- Disable default health bar and backpack
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
|
||||
```
|
||||
|
||||
Additionally, devices with touch capabilities include a virtual thumbstick and a jump button by default. If desired, you can hide these elements by setting `Class.GuiService.TouchControlsEnabled` to `false` in a client‑side script.
|
||||
|
||||
<img src="../../assets/ui/misc/TouchGui-Elements.png" width="840" alt="UI elements for touch-capable devices in every Roblox experience" />
|
||||
|
||||
```lua title="Client Script - Disable Touch Controls"
|
||||
local GuiService = game:GetService("GuiService")
|
||||
|
||||
GuiService.TouchControlsEnabled = false
|
||||
```
|
||||
32
.cursor/rules/roblox/en-us/includes/ui/screen-insets.md
Normal file
32
.cursor/rules/roblox/en-us/includes/ui/screen-insets.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: include
|
||||
---
|
||||
|
||||
Modern phones take advantage of the entire screen but typically include notches, cutouts, and other elements that occupy screen space. Every Roblox experience also includes the **top bar controls** for quick access to the main menu, [chat](../../chat/in-experience-text-chat.md), [leaderboard](../../players/leaderboards.md), and more.
|
||||
|
||||
<img src="../../assets/engine-api/enums/ScreenInsets/Top-Bar-Cutout.png" width="840" alt="Mobile device showing Roblox top bar buttons and device cutout." />
|
||||
|
||||
To ensure players can see and access all UI easily and without obstruction, Roblox provides the `Class.ScreenGui.ScreenInsets|ScreenInsets` property which controls the **safe area** insets for the contents of a `Class.ScreenGui`.
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="CoreUISafeInsets">
|
||||
The default of `Enum.ScreenInsets|CoreUISafeInsets` keeps all descendant `Class.GuiObject|GuiObjects` inside the core UI safe area, clear of the top bar buttons and other screen cutouts. This setting is recommended if the `Class.ScreenGui` contains interactive UI elements.
|
||||
|
||||
<img src="../../assets/engine-api/enums/ScreenInsets/CoreUISafeInsets.png" width="840" height="403" alt="Mobile device showing the core UI safe area." />
|
||||
</TabItem>
|
||||
<TabItem label="DeviceSafeInsets">
|
||||
A setting of `Enum.ScreenInsets|DeviceSafeInsets` guarantees that no descendant `Class.GuiObject|GuiObjects` are occluded by any device screen cutouts such as the camera notch, although no inset is added for Roblox core UI elements like the top bar buttons.
|
||||
|
||||
<img src="../../assets/engine-api/enums/ScreenInsets/DeviceSafeInsets.png" width="840" height="403" alt="Mobile device showing the device safe area." />
|
||||
</TabItem>
|
||||
<TabItem label="TopbarSafeInsets">
|
||||
A setting of `Enum.ScreenInsets|TopbarSafeInsets` keeps all descendant `Class.GuiObject|GuiObjects` between the top bar controls and the right edge of the device safe area. The `Class.ScreenGui` will then automatically flex in horizontal size based on the top bar's content.
|
||||
|
||||
<img src="../../assets/engine-api/enums/ScreenInsets/TopbarSafeInsets.png" width="840" height="403" alt="Mobile device showing the top bar safe area within the Roblox controls." />
|
||||
</TabItem>
|
||||
<TabItem label="None">
|
||||
No insets are added to the fullscreen area. This mode may result in UI that is obscured or completely hidden by device notches and cutouts, so you should only use it for a `Class.ScreenGui` that contains non‑interactive content like background images.
|
||||
|
||||
<img src="../../assets/engine-api/enums/ScreenInsets/None.png" width="840" height="403" alt="Mobile device showing the entire screen region with no account for safe areas." />
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
Loading…
Add table
Add a link
Reference in a new issue