Skip to content

Commit 0b52d19

Browse files
refactor: format requestPointerLock function for improved readability
1 parent facec05 commit 0b52d19

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

module/source/hooks/use-unity-context.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ const useUnityContext = (unityConfig: UnityConfig): UnityContext => {
6363
* Pointer lock mode allows the Unity Instance to capture mouse movements
6464
* without the cursor leaving the Unity canvas.
6565
*/
66-
const requestPointerLock = useCallback(() => {
67-
unityInstance?.Module.canvas?.requestPointerLock();
68-
}, [unityInstance]);
66+
const requestPointerLock = useCallback(
67+
() => unityInstance?.Module.canvas?.requestPointerLock(),
68+
[unityInstance]
69+
);
6970

7071
/**
7172
* Sends a message to the Unity Instance to invoke a public method.

0 commit comments

Comments
 (0)