File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ const useUnityArguments = (unityProps: UnityProps): UnityArguments => {
4848 // value of `1` will be used.
4949 devicePixelRatio : unityProps . devicePixelRatio || 1 ,
5050
51+ // Assigns the auto sync persistent data path value to the Unity arguments
52+ // object. If the auto sync persistent data path value is not defined via
53+ // the Unity Props, the default value of `undefined` will be used.
54+ autoSyncPersistentDataPath : unityProps . autoSyncPersistentDataPath ,
55+
5156 // Assigns the match WebGL to canvas size value to the Unity arguments
5257 // object. If the match WebGL to canvas size value is not defined via the
5358 // Unity Props, the default value of `true` will be used.
Original file line number Diff line number Diff line change @@ -81,6 +81,16 @@ type UnityArguments = {
8181 */
8282 readonly devicePixelRatio ?: number ;
8383
84+ /**
85+ * If set to true, all file writes inside the Unity Application
86+ * persistentDataPath directory automatically persist so that the contents are
87+ * remembered when the user revisits the website the next time. If unset (or
88+ * set to false), you must manually sync file modifications inside the
89+ * Application persistentDataPath directory by calling the
90+ * JS_FileSystem_Sync() JavaScript function.
91+ */
92+ readonly autoSyncPersistentDataPath ?: boolean ;
93+
8494 /**
8595 * When disabling the match WebGL to canvas size flag, the canvas allows for
8696 * client side customization of the WebGL canvas target size instead of
Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ import { UnityArguments } from "./unity-arguments";
99 */
1010type ConfigurableUnityArguments = Pick <
1111 UnityArguments ,
12- "devicePixelRatio" | "matchWebGLToCanvasSize" | "disabledCanvasEvents"
12+ | "devicePixelRatio"
13+ | "matchWebGLToCanvasSize"
14+ | "disabledCanvasEvents"
15+ | "autoSyncPersistentDataPath"
1316> ;
1417
1518/**
You can’t perform that action at this time.
0 commit comments