Skip to content

Commit

Permalink
makes sure there are no unfinished jobs when destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-raphael-lukasik committed Sep 12, 2022
1 parent 5744c40 commit 121a594
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Scripts/Internal/DaggerfallBillboardBatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ void Awake()

void OnDestroy()
{
// make sure there are no unfinished jobs:
Dependency.Complete();
UvAnimationDependency.Complete();

if (billboardData.IsCreated) billboardData.Dispose();
if (meshVertices.IsCreated) meshVertices.Dispose();
if (meshNormals.IsCreated) meshNormals.Dispose();
Expand Down

0 comments on commit 121a594

Please sign in to comment.