Skip to content

Commit 255e314

Browse files
authored
fix(core): move clear() method to unmount Unity (#46)
- Move clear() method to unmount Unity - This change ensures that the clear() method is called after the Unity instance is properly unloaded
1 parent 4bbfda0 commit 255e314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ class UnityWebgl extends UnityWebglEvent {
199199
.then(() => {
200200
this._unity = null
201201
this._canvas = null
202-
this.clear()
203202

204203
this.emit('unmounted')
204+
this.clear()
205205
})
206206
.catch((err) => {
207207
log.error('Unable to Unload Unity')

0 commit comments

Comments
 (0)