Skip to content

Commit cbaec96

Browse files
update Open Source Docs from Roblox internal teams
1 parent d6b68cf commit cbaec96

File tree

5 files changed

+185
-16
lines changed

5 files changed

+185
-16
lines changed

content/common/navigation/engine/reference.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,11 @@ navigation:
14631463
type: engineapi
14641464
source: /reference/engine/classes/InsertService.yaml
14651465
ignoreTranslation: true
1466+
- title: InstanceFileSyncService
1467+
path: /reference/engine/classes/InstanceFileSyncService
1468+
type: engineapi
1469+
source: /reference/engine/classes/InstanceFileSyncService.yaml
1470+
ignoreTranslation: true
14661471
- title: JointInstance
14671472
path: /reference/engine/classes/JointInstance
14681473
type: engineapi
@@ -4656,6 +4661,11 @@ navigation:
46564661
type: engineapi
46574662
source: /reference/engine/enums/InputType.yaml
46584663
ignoreTranslation: true
4664+
- title: InstanceFileSyncStatus
4665+
path: /reference/engine/enums/InstanceFileSyncStatus
4666+
type: engineapi
4667+
source: /reference/engine/enums/InstanceFileSyncStatus.yaml
4668+
ignoreTranslation: true
46594669
- title: IntermediateMeshGenerationResult
46604670
path: /reference/engine/enums/IntermediateMeshGenerationResult
46614671
type: engineapi

content/en-us/reference/engine/classes/Instance.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ descendants:
346346
- DraftsService
347347
- DraggerService
348348
- File
349+
- InstanceFileSyncService
349350
- PlacesService
350351
- PluginManagementService
351352
- ReflectionMetadata
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# This file is automatically generated. Please don't edit it manually.
2+
# To submit a bug report on the content, see
3+
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
4+
5+
name: InstanceFileSyncService
6+
type: class
7+
memory_category: Instances
8+
summary: |
9+
A service for interacting with file sync from a plugin.
10+
description: |
11+
The `InstanceFileSyncService` service provides an interface for plugins to
12+
interact with the file sync system (currently known as **Script Sync**). It
13+
allows querying the sync status of instances and retrieving instances based on
14+
file paths.
15+
code_samples: []
16+
inherits:
17+
- Instance
18+
descendants: []
19+
tags:
20+
- NotCreatable
21+
- Service
22+
- NotReplicated
23+
deprecation_message: ''
24+
properties: []
25+
methods:
26+
- name: InstanceFileSyncService:GetAllInstances
27+
summary: |
28+
Returns an array of all instances currently involved in file
29+
synchronization.
30+
description: |
31+
Returns an array containing every `Class.Instance` that is currently being
32+
tracked or synchronized by file sync.
33+
code_samples: []
34+
parameters: []
35+
returns:
36+
- type: Instances
37+
summary: |
38+
Returns an array of `Class.Instance|Instances`.
39+
tags: []
40+
deprecation_message: ''
41+
security: PluginSecurity
42+
thread_safety: Unsafe
43+
capabilities: []
44+
- name: InstanceFileSyncService:GetStatus
45+
summary: |
46+
Returns the synchronization status of a specific instance.
47+
description: |
48+
Returns the current `Enum.InstanceFileSyncStatus` of the provided
49+
`Class.Instance`. This indicates whether the instance is synced as a root,
50+
as a descendant, or if it is in an error state.
51+
code_samples: []
52+
parameters:
53+
- name: instance
54+
type: Instance
55+
default:
56+
summary: |
57+
The instance to check.
58+
returns:
59+
- type: InstanceFileSyncStatus
60+
summary: |
61+
Returns the `Enum.InstanceFileSyncStatus` for the instance.
62+
tags: []
63+
deprecation_message: ''
64+
security: PluginSecurity
65+
thread_safety: Unsafe
66+
capabilities: []
67+
- name: InstanceFileSyncService:GetSyncedInstance
68+
summary: |
69+
Returns the instance corresponding to a given file path.
70+
description: |
71+
Returns the `Class.Instance` associated with the specified absolute file
72+
path. Returns `nil` if the path is not mapped to any instance.
73+
code_samples: []
74+
parameters:
75+
- name: filePath
76+
type: string
77+
default:
78+
summary: |
79+
The absolute path to the file.
80+
returns:
81+
- type: Instance
82+
summary: |
83+
Returns the Instance being synced to the file path, if one exists.
84+
Otherwise, returns nil.
85+
tags: []
86+
deprecation_message: ''
87+
security: PluginSecurity
88+
thread_safety: Unsafe
89+
capabilities: []
90+
events:
91+
- name: InstanceFileSyncService.StatusChanged
92+
summary: |
93+
Fires when the synchronization status of an instance changes.
94+
description: |
95+
This event fires when the `Enum.InstanceFileSyncStatus` of an
96+
`Class.Instance` changes. It passes the affected instance and the new file
97+
sync status enum value.
98+
code_samples: []
99+
parameters:
100+
- name: instance
101+
type: Instance
102+
default:
103+
summary: |
104+
The instance whose status changed.
105+
- name: status
106+
type: InstanceFileSyncStatus
107+
default:
108+
summary: |
109+
The new synchronization status.
110+
tags: []
111+
deprecation_message: ''
112+
security: PluginSecurity
113+
capabilities: []
114+
callbacks: []

content/en-us/reference/engine/classes/MarketplaceService.yaml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,19 +1284,18 @@ methods:
12841284
12851285
#### Caching Behavior
12861286
1287-
The results of this function are remembered so that repeated calls are
1288-
returned faster.
1289-
1290-
This function always returns true when the user first enters a server
1291-
after purchasing the pass.
1292-
1293-
If the user has purchased the pass inside an experience through
1294-
`Class.MarketplaceService:PromptGamePassPurchase()|PromptGamePassPurchase`,
1295-
the
1296-
`Class.MarketplaceService:UserOwnsGamePassAsync()|UserOwnsGamePassAsync()`
1297-
function might return false because of caching behavior. Alternatively,
1298-
the function might return true even after the user has deleted the pass
1299-
from their inventory.
1287+
The results of this function are cached so that repeated calls are
1288+
returned faster. When the
1289+
`Class.MarketplaceService.PromptGamePassPurchaseFinished|PromptGamePassPurchaseFinished`
1290+
event fires, the cache gets updated to reflect the latest ownership state
1291+
of the associated game pass.
1292+
1293+
If the user purchases a game pass outside of the experience while
1294+
remaining in the same session, the cache is eventually updated, but this
1295+
process might take several minutes to propagate.
1296+
1297+
When a user first enters a server after purchasing a game pass, this
1298+
functions always returns true.
13001299
code_samples: []
13011300
parameters:
13021301
- name: userId
@@ -1437,10 +1436,16 @@ events:
14371436
Indicates if the user pressed **OK** (true), **Cancel** (false) on the
14381437
purchase prompt, or if the purchase prompt errored (false).
14391438
1440-
This might not accurately reflect if the purchase itself has been
1441-
successfully processed. Use
1439+
When `PromptGamePassPurchaseFinished` fires, it updates the cache used
1440+
by
14421441
`Class.MarketplaceService:UserOwnsGamePassAsync()|UserOwnsGamePassAsync()`
1443-
as ownership confirmation.
1442+
to reflect the current ownership state.
1443+
1444+
`PromptGamePassPurchaseFinished` should only be listened to in a
1445+
server script. When used on the server, values such as `wasPurchased`
1446+
reflect the final outcome of the purchase attempt. When used in a
1447+
local script, these values should not be relied on for validation or
1448+
game logic.
14441449
tags: []
14451450
deprecation_message: ''
14461451
security: None
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This file is automatically generated. Please don't edit it manually.
2+
# To submit a bug report on the content, see
3+
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
4+
5+
name: InstanceFileSyncStatus
6+
type: enum
7+
summary: |
8+
Describes the file sync status of an Instance.
9+
description: |
10+
Describes the file sync status of an `Class.Instance`.
11+
code_samples: []
12+
tags: []
13+
deprecation_message: ''
14+
items:
15+
- name: NotSynced
16+
summary: |
17+
The `Class.Instance` is not being synced or errored.
18+
value: 0
19+
tags: []
20+
deprecation_message: ''
21+
- name: Errored
22+
summary: |
23+
The `Class.Instance` is a sync root that has errored and stopped syncing.
24+
value: 1
25+
tags: []
26+
deprecation_message: ''
27+
- name: SyncedAsRoot
28+
summary: |
29+
The `Class.Instance` is being synced as the root of a sync tree.
30+
value: 2
31+
tags: []
32+
deprecation_message: ''
33+
- name: SyncedAsDescendant
34+
summary: |
35+
The `Class.Instance` is being synced because it is a descendant of a sync
36+
root.
37+
value: 3
38+
tags: []
39+
deprecation_message: ''

0 commit comments

Comments
 (0)