Skip to content

Commit ae0237e

Browse files
Fix canvas ID generation to prevent incrementing canvas count prematurely
1 parent fb21ed7 commit ae0237e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/source/hooks/use-canvas-identifier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const useCanvasIdentifier = (id?: string): [string, VoidFunction] => {
4545
// The Unity canvas ID is generated by concatenating the Unity canvas ID
4646
// prefix with the canvas count. Every time this value is requested, the
4747
// canvas count is incremented.
48-
return [canvasIdPrefix, ++unityCanvasCount].join("-");
48+
return [canvasIdPrefix, unityCanvasCount].join("-");
4949
}, [canvasIncremention]);
5050

5151
return [canvasId, refreshCanvasId];

0 commit comments

Comments
 (0)