File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ export class Unity extends PureComponent<IUnityProps, {}> {
120120 _unityInstanceParameters ,
121121 this . onProgress . bind ( this )
122122 ) ;
123+ // We increment the unique identifier counter to avoid conflicts.
124+ Unity . uniqueIdentifiers ++ ;
123125 // Finally pass the instance back to the context object.
124126 this . unityContext . setUnityInstance ( _unityInstance ) ;
125127 // Since the creation of the Unity Instance is async, we'll check the
@@ -143,7 +145,7 @@ export class Unity extends PureComponent<IUnityProps, {}> {
143145 */
144146 public render ( ) : React . ReactNode {
145147 return createElement ( "canvas" , {
146- id : `unity-canvas-${ Unity . uniqueIdentifiers ++ } ` ,
148+ id : `unity-canvas-${ Unity . uniqueIdentifiers } ` ,
147149 ref : ( ref : HTMLCanvasElement ) => ( this . htmlCanvasElementReference = ref ) ,
148150 className : this . props . className || "" ,
149151 tabIndex : this . props . tabIndex || undefined ,
You can’t perform that action at this time.
0 commit comments